Search code examples
facebookauthenticationuser-accounts

To merge or not to merge? Facebook account and regular site account


I am building a web service that will allow users to register either by creating a 'regular' account (username / password) or by using their facebook login (facebook connect)

If a user registers with facebook, they will get an account created on my site.

If a user registers the normal way (username / pass) they will also get an account.

What I would like to do is somehow merge these accounts if they have the same email address. Is this viable or should I leave them as separate accounts?

The reason for merging is that I don't want users to have several accounts per email address Does anyone else create accounts on their sites via facebook and regular accounts? If so, what logic do you apply for handling these two different types accounts?

UPDATE

I guess my question is, if a regular account has the same email address as a facebook account. Am I safe to merge the accounts? Or can I not trust the email the user has associated with their facebook account? –


Solution

  • Not sure if I get what you are trying to say, but I also already have a bunch of accounts and link them to A Facebook profile. Difference is I also have them loging using the original site.

    So I won't need to check Emails. It's like this:

    1. A user already has a login for the local site, in that case when they link their account with google, all I do is add a FacebookId field to the Table.
    2. A user does not yet have an account on my site, but reaches it through a valid facebook account, in that case the user is added to my list of accounts and gets both a internal Id, and a FacebookId.

    Hope this helps you out a bit. Of course I could also be thinking in the complete opposite direction here..