Answer the question
In order to leave comments, you need to log in
What to do if the user has many social networks during authorization?
I implement authorization through social networks. They suggest adding network_id to users and authorize it like that. But what if the network_id can be multiple? Because the user can have both Google and Facebook, and you never know what he will click there. It turns out that you need to make a new table for data from social networks with user_id, connect with users and write there all the social networks through which he wants to go. Is this the correct approach?
Answer the question
In order to leave comments, you need to log in
You can not suffer and use ready-made solutions - called Identity Server. You can install it yourself: Keycloak, for example. Or try SaaS: Auth0. I have named only the brightest representatives.
If you want to do it yourself, then you need to organize the mapping of tokens from social networks and users in your system, as well as do a lot of controls for all this colossus
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question