views:

27

answers:

1

Google published that they are testing a feature that allows you to sign in simultaneously to multiple Google accounts in the same browser.

Any idea how would that be implemented ?

A: 

I don’t have any inside info on how multiple accounts are actually supported, but here’s what I presume:

  1. Your cookie holds a security token, just like in the old days.
  2. The security token now maps to a set of signed-in accounts on the server.
  3. I’d guess there’s a notion of an active account among this set.
  4. When you go to a Google service that implements multiple-account support, the service pulls down your active account and drops you into that account by default.
  5. Then, you get presented with some UI that lets you toggle between your other signed-in accounts or lets you sign into a new account.
byoogle
IIUC, you mean that the auth cookie holds all my identities, and other per-service cookies hold the "who am I for this service" data. This will explain simultaneous services, but not simultaneous sessions with the same service - 2 GMail windows with different identities. Any insight on this ? [ Meanwhile - accepting your answer as closest (and only ...) answer :-) ]
ob1
You won’t be able to have two Gmail windows (in the same browser or that share a cookie store) logged into different accounts anymore (that’s one thing I’m sure of from having dogfooded this feature). I *think* this behavior extends to other multiple-account properties too. So for instance, you wouldn’t be able to be logged into Gmail with one account and Google Calendar with another (but you could always just toggle between accounts). Because of this fact, my guess is the active account (see the third step above) is stored on the server.
byoogle