This can be done via one domain acting like a master and others like a slave.
Say we've got a domain accounts.domain.com and it's our master.
Then we've got our slaves domain.com
, something.com
and another.com
When you'll log on on domain.com, it'll be actually site accounts.domain.com
, then you'll get a cookie with unique ID for your browser and then you'll be redirected to domain.com's post-logon landing page (ie. domain.com/logon?check=true&unique-id=<browser unique id>&request-id=<unique request ID>
). the landing page will contact the accounts.domain.com
, querying it with the browser ID. If the transaction's okay, then you'll get logon cookie from domain.com
.
Next, on every domain (domain.com
, something.com
and another.com
) will be initial redirect to accounts.domain.com/roaming-check?return-url=<URL the redirect was initiated from>
. Because we're returning home (we're logged already on accounts.domain.com
), we'll be redirected again on our landing page (<domain name>.com/logon?check=true&unique-id=<browser unique id>&request-id=<unique request ID>
) and from this point it's the same as the part with logging on. We're seamlessly roamed to another domain (without user knowing it as browsers doesn't usually show the redirected page until it passed the headers send(server)/receive(browser) section).
In case there's in fact no active logon, the site will save this "negative logon" to session and not try to check logon anymore (until we try to logon or load another domain).