socialite in laravel code example
Example 1: socialite laravel 7
return Socialite::driver('github')
->setScopes(['read:user', 'public_repo'])
->redirect();
Example 2: socialite laravel 7
$user = Socialite::driver('github')->userFromToken($token);
Example 3: socialite laravel 7
Route::get('login/github', 'Auth\LoginController@redirectToProvider');
Route::get('login/github/callback', 'Auth\LoginController@handleProviderCallback');