Single sign-on services (facebook, twitter, linkedin): how to combine accounts

The problem I see with SSO is that if you log in to Facebook once, use Twitter and use LinkedIn once, you have three different accounts. Everything will be fine if Twitter will give an email address. So how do you fix this?

+4
source share
1 answer

I have the same problem and I was hoping that smart people on SO would have an elegant solution. All I can do is:

  • User logs in with LinkedIn
  • Check the user table to see if they have an account using their LinkedIn ID
  • If not, ask them to provide an email address before writing them to
  • When we have an email address, check if they have an account using your email address
  • If so, add their LinkedIn ID to this entry and write them to
  • If they do not, create a new entry and write them in

This means that for each user account, fields are required for each possible account, or more correctly use the link table associated with their local user ID, with an entry for each account that they are a member of. This also strikes the advantage of simply logging into OpenId, because the user must register their email address the first time they log in with a new OpenId account.

As I said, elegantly it is not, but it is the best I can think of.

+4
source

All Articles