Reputation: 3209
This is a theoretical question.
Suppose I have a Twitter, Facebook, G+, Instagram account all with the email address [email protected]
and now I want to design a web application that allows users to login to the application with their Twitter, Facebook, G+, Instagram accounts or by a standard registration form.
The unique identifier of my users is their email address.
Now suppose I already have an account registered with the email [email protected]
how should I design the mechanism to allow me to link my Twitter, Facebook, G+, Instagram account?
Method 1
Ask the user to login first then connect to their other accounts.
Pro:
Cons:
Method 2
Assume that the third party oauth providers confirms the email, just associate the third party account to the existing account (in my application) with the existing email provided by the third party.
Pro:
Cons:
Question
How can I ensure that [email protected]
from Facebook is the same [email protected]
from G+?
Or is there no simple/user friendly way to do this?
Upvotes: 1
Views: 213
Reputation: 4019
You can't assume that the email they've used to create your account is the same one they used to create their twitter or facebook accounts. In addition, twitter does not return the email address associated with the user's account. Solution number 1 is really your only option.
Upvotes: 1