What is the good design for multiple social login database on user?
I am looking for an idea on designing table for user login with SSO/ traditional way. Basically, i am using one table to do the job by identify the provider_type and provider_key. I am thinking whether to separate it out into multiple table for social provider or 2 tables (user and provider).
Is it legit if every social account is linked to each other and access to same user?
Or as a new user for each social account?
Or it depends on business model?
I had situations were we had separate user for every social account and in the end we wanted to merge them. And also the opposite. So it depends on what do you need from business perspective. I would rather go with single user with multiple accounts.
I think it all depends on wether you want to show apps related to those social accounts. If you have a calendar in your app for which you pull data from Google Calendar or Microsoft Calendar then it depends on the use cases you want to cover. If you want to show data from both GC and MC at the same time, then one user account should be "linked" to multiple social accounts. If that is not what you want/need, then other approach might be better where you have one user per social account.
So how was thing going on, e.g. a user use multiple social account to login. There might be some info different like profile photo, are we going to display the info based on social account or ignore it. Allowed them to login and just show the registered details at first?
That depends on what do you want to allow your users to do. I don't think you can go right or wrong here. You can present to them all profile pictures from social accounts and let them pick the one that they like the most. Only limit is your imagination.