app/Http/Controllers/Auth/LoginController.php
/**
     * Obtain the user information from GitHub.
     *
     * @return \Illuminate\Http\Response
     */
Obtain the user information from GitHub.
@return \Illuminate\Http\Response
Obtain the user information from GitHub . @return \ Illuminate \ Http \ Response
public function handleProviderCallback()
    {
        $user = Socialite::driver('facebook')->stateless()->user();
        $user=User::firstOrCreate([
            'name'=>$user->getName(),
            'email'=>$user->getEmail(),
            'provider_id'=>$user->getId()
        ]);
        Auth::Login($user,true);
        return redirect('/home');
    }
public function handleProviderCallback ( ) { $ user = Socialite :: driver ( 'facebook' ) -> stateless ( ) -> user ( ) ; $ user = User :: firstOrCreate ( [ 'name' => $ user -> getName ( ) , 'email' => $ user -> getEmail ( ) , 'provider_id' => $ user -> getId ( ) ] ) ; Auth :: Login ( $ user , true ) ; return redirect ( '/home' ) ; }
Obtain the user information from GitHub.
Obtain the user information from GitHub .
// $user->token;