Answer the question
In order to leave comments, you need to log in
How to get authorized user after Laravel Socialite callback?
Good afternoon! I have a Laravel and ReactJS application (not create-react-app).
I log in to Facebook using Laravel Socialite, then in the callback function I create a user and immediately authorize him.
public function handleProviderCallback($provider)
{
$socialiteUser = Socialite::driver($provider)->user();
$user = $this->findOrCreateUser($provider, $socialiteUser);
Auth::login($user, true);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question