Answer the question
In order to leave comments, you need to log in
How to do account linking?
In fact, linking is no different from authorization, as I understand it, with the only difference being that we take data from the social network and do not authorize the user under the linked account, but simply assign it to him. What is the best way to store it in the database? I can’t store all accounts in one table, since I have uniqueness in the email field, and accounts of different social networks have email. address may be the same. Make a table with accounts and a pivot table for linking linked accounts with users? Can you share your own experience, if any?
Answer the question
In order to leave comments, you need to log in
make a table user_social
, and store links to social networks there. one-to-many link by user ID.
If you have decided to write your own Identity Server, then maybe look at ready-made solutions? Auth0 for example cool guys
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question