Answer the question
In order to leave comments, you need to log in
What is the logic of authorization through social networks on a site with laravel jwt?
The site has a standard registration and login via email-password.
Now you need to make authorization through social networks, for example vk.
On the server, I received vk user data - id, first_name, last_name.
At this point, I'm a little confused.
1. This data must be saved in the database.
2. After saving the data, how to authorize the user? if I have authorization through email - password
3. If the user logs in through another social network, he will have 2 entries in the database.
I can not understand the logic of this process.
Answer the question
In order to leave comments, you need to log in
Abisnyayu:
1. You save the data in the database - the user in one table, binding to the social network in another.
2. Authenticate (this is not authorization, when you already understand the difference) the user by id in your database. As - it is written in the documentation.
3. You also need to request soap from the social network, it will be the “unifying” key - rarely does anyone register on different social networks with different soaps. Well, if so, then nothing can be done.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question