R
R
Roman2019-03-07 09:04:33
Laravel
Roman, 2019-03-07 09:04:33

What is the easiest way to link social accounts to the main one in Laravel?

Hello.
What is the easiest way to link social accounts to the main one?
To make it clear that these are the accounts of the user, and not some left.
For example, a user enters his profile and clicks on the "add a Facebook account" button - he is transferred to FB - there he confirms - and then in Laravel this account is now listed for him.
Are there ready-made solutions for this?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Arutyunov, 2019-03-07
@procode

Laravel Socialite - it's just that if the user is already authorized, then the handler needs to be written a little differently. In any case, the social network returns you an id, which you link to the current user on the site. After that, the user will be able to log in via social networks (if you make such functionality).
Socialite has a bunch of providers for authorization through popular networks: fb, vk, google, telegram, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question