I managed to get my dual login working. On login, it creates two cookies .... security and PHPSSID. When I log out of project one it successfully removes that security cookie from site two as it should. However the login identity remains in project tow after log out. The security cookie is properly removed but the PHPSSID cookie remains.
My question is why without the security cookie is the second site still logged in? On the second site I have a flow that loads the user details and identity and if no identity exsists it logsout. But the only cookie remaining on the second site is the PHPSSID cookie. How can I clear that one? Is the security ID stored in the PHPSSID cookie as well?
The reason site two still shows you as logged in is because the PHPSSID session on the API server is still alive. The security cookie is gone, but the PHP session still contains the identity, so your identity loader keeps finding it.
To fully log out both sites, your logout action needs to destroy the PHP session as well — not just remove the security cookie.
Your logout action should run Security Logout and then Remove Session. Remove Session destroys the PHP session on the server, which kills the PHPSESSID cookie.