For my site, I use a login system similar to the one on SO. The user can log in with his Facebook, Google (Gmail openID), Twitter account.
This question does not concern specific implementations of oAuth or openID.
The question is how to find out if the same user is logged in with different providers.
Let me give an example:
Bobo comes to the site to enter the site by clicking "Sign in with Facebook." Since this is his first visit, we are creating a report for him.
Later Bobo will appear on the site. This time he clicks "Sign in to Google." So, how do I know if this is the same person, so I can add this provider to my account, and not create a new (and duplicate) account.
Can I trust exclusively by email?
What is the best way to handle this. How does SO do this?
Any ideas?
Edit: If I trust email, is it possible that the same email address can be used by different users? Could this be a security issue?
Sinan source share