-1

If an app allows its users to signup using multiple platforms like facebook, google, twitter and also use local signup, How should the users Table be defined in the database? Should all users be stored in a single Users table in the database irrespective of their signup mode. Or is it better to breakdown and create a separate tables to store Users depending on what they used to signup. e.g. facebookUsers, GoogleUsers, twitterUsers, localUsers?

1

You will definitely want a single users table that holds every user which will make managing authorization and user management easier. How a user authenticates isn't super important as long as you can trust the authentication to accurately identify a user. The important thing is that you can identify a user as the same user regardless of how they authenticate, so you don't create confusion for the user when they use Facebook to authenticate because they forgot they had a local username/password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.