Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I have an account with Google & Facebook. Login IDs for them both are same (same gmail id).
When logging into StackOverflow using either of Google or Facebook logins would link to same account.
How does that work?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Stackoverflow likely uses an internal id after you log into the site. Then (after logging in) you can merge the other IDs.

If you sign in using the alternate ID and never merged them then they appear as separate accounts, even if the user is actually the same human.

Here is SO's source code for OpenID. Let me know if you dig up something interesting, the folks at StackExchange write great code you can learn from

share|improve this answer
    
I have always used Google to log into SO, and for the first time I used Facebook and I was startled when it took me to the same account. The only reason I can think of is I use same Ids to log into Google & Facebook sites. –  Alexander Jun 6 '12 at 23:45
    
Actually I think you may have the remains of the SO Global Auth cookie. There is a per-site cookie and one global auth cookie. Sometimes things get screwy and so one or both cookies don't get cleared or set. Then for whatever reason SO sees the remaining cookie and logs you in. I think what you experienced was this occasional bug –  makerofthings7 Jun 7 '12 at 0:30
    
Ok. Till now I have never manually linked these 2 logins in SO. After your suggestion, I cleared all active logins, cookies, and cache. And tried logging in with Facebook login and I am linked to the same account. This I think is not an 'occasional' bug. Its either a bug or a feature to link accounts if IDs are same. –  Alexander Jun 7 '12 at 22:37
    
@ReddySR Did you go to your account, click my logins and disconnect facebook before doing that test you mentioned? If this is a bug you should report it to meta.stackoverflow. I tried it myself and see it working normally. –  makerofthings7 Jun 7 '12 at 23:32

I would say that stackoverflow links your account to any number of open ids. When you login with any of the linked open ids, you get logged into the stackoverflow site.

share|improve this answer
    
But aren't Google & Facebook 2 different OpenID providers? How are they linked by SO? –  Alexander Jun 5 '12 at 20:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.