I'd like to seamlessly login users between my sites, located on different domains. (For historical reasons, two different language versions of the site are hosted on different domains....I know... but the user should not need to log in again once changing languages.)
I thought of the following:
- The user is on
a.com. - The script on
a.commakes an ajax POST request tob.com
andb.comresponds with a session cookie. - The browser sets that session cookie for
b.com. - The script sets
window.location = 'b.com'. - The user sees himself automatically logged-in on
b.com.
Will this method work?