Suppose I have domain-a.com (A) and domain-b.com (B) I'd like to be able to share php sessions between the two domains unifying logins in a way that once the user is logged to A is automatically logged into B and vice versa. Now, the problem I'm facing is that even if I managed to have the browser talk via ajax to an external domain via the Access-Control-Allow-Origin header it won't set cookies (please don't tell me "you can't set/get cookies for another domain, this is not the problem") here's the flow: A sends credentials to B if credentials are OK -B answers with the SESSID made in order to be consistent with the user credentials (so that it can be generated both ways ie: login from A or login from B), this will be used later to share the session created on B -At the same time I'd like that B could write cookies for its domain, but so far I wasn't able. What I need here is very simple, once that the credentials from A are...