I have the same question, and although this is not a complete solution (I donβt think that it is actually 100% reliable), this is what I am creating now.
Example: site with username / password, Facebook and Twitter for authentication.
A user comes to the site and wants to register. They register using Twitter for authentication. Twitter transmits a ton of information except an email address. I save profile information (location, name, etc.), which, I think, will be useful for comparison. The user is provided with a profile page immediately after authentication to verify the profile information (they can delete any information that they do not want to store). They also have the option to add additional authentication methods (in this case, username / password and Facebook). The more you encourage them to associate additional authentication methods during registration, the less problems you will have with duplicate accounts. However, it still exists as a marginal case.
The scenario of the edge case is as follows: the user signs up using Twitter, and then immediately signs up and tries to log in using Facebook. The sign method detects that this is a new authentication, and therefore it compares the oauth data from Facebook with existing profile information and tries to find matches. Then I show a match of 10 or so and ask the user to check if they exist in order to link the account. Ask the user to log in using Twitter and then link the Facebook account.
Obviously, it would be simpler and easier if everyone used the same email address and Twitter would actually return the email address. But not everyone makes it so that you need to handle this extreme edge in the best way - at this stage I will try the match option and just ask users to authenticate using other services when registering and filling out profile information.
source share