Laravel Socialite: Invalid request. Missing OAuth verifier. (Twitter)

前端 未结 2 1574

This is my first time working with Socialite and I can\'t seem to get it to work correctly.

Essentially, all I want is to return some account details of the currently au

相关标签:
2条回答
  • 2021-01-21 11:43

    You can check... $request->exists('denied') for Twitter and $request->exists('error') for Linkedin. It working on my application in Laravel 6.0* with Socialite 4.0*.

    if ($request->exists('denied') || $request->exists('error')) 
    {   
        // do something
    
    }else{
        $socialAccount = Socialite::driver($provider)->user();
    }
    
    0 讨论(0)
  • 2021-01-21 11:54

    Check this syntax

    $socialAccount = Socialite::driver('twitter')->user();
    

    If you want the account details of the currently authenticated user, use the same old

    $user = Auth::user();
    
    0 讨论(0)
提交回复
热议问题