You need to use one domain as the main login system (keyDomain). Then for each other domain2 you request keyDomain for a temporary key, use this key to enter domain 2. Domain2 server checks the key for keyDomain.
You need two methods for keyDomain. - One to build keys. They must be time dependent and valid for 5 minutes. - One check the key, check this key for the current, and then again the previous one, if the time interval has changed between the request and the check. (Both the current key and the previous one are valid, so it makes it valid in 10 minutes).
The key is just a string containing time + user_ID + salt, all encoded.
You should see how facebook works.
source share