composer require laravel/socialite
'github' => [
'client_id' => env('GITHUB_CLIENT_ID'),
'client_secret' => env('GITHUB_CLIENT_SECRET'),
'redirect' => 'http://your-callback-url',
],
return Socialite::driver('github')
->setScopes(['read:user', 'public_repo'])
->redirect();
$user = Socialite::driver('twitter')->userFromTokenAndSecret($token, $secret);
$user = Socialite::driver('github')->userFromToken($token);
return Socialite::driver('google')->stateless()->user();
Route::get('login/github', 'AuthLoginController@redirectToProvider');
Route::get('login/github/callback', 'AuthLoginController@handleProviderCallback');
return Socialite::driver('google')
->with(['hd' => 'example.com'])
->redirect();
return Socialite::driver('github')
->scopes(['read:user', 'public_repo'])
->redirect();