I am using omni-auth so that user can authenticate using both Facebook or/and Linkedin.
Now some users would use the same email id for db,lnkd registration. My user table enforces that the email should be unique for a user.
So if an already registered user through one social network could not login through other social network
I am using Rails with devise and omni-auth gems.
Now with omni-auth and social logins: 1] There is no unique attribute for a user (email could be multiple etc) 2] There is no way of determining same user with fb and linkedin logins are actually the same user.
Rails, In general loads a lot of user data into user object so it might be tricky to work with gems if user is not actually a user model.
1] How do I create a user table without a single unique element ?
2] How are the sites like Quora, Airbnb etc handling this ?
3] Seems like a very common problem. Any gems I can look at ?
Thanks!