Im trying to use Socialite package for laravel and I would like to know how to pass additional parameters to callback url. It seems that OAuth allows additional params, but I haven't found any solution for laravel on how to pass them. Currently my methods look like this
public function login($provider)
{
return Socialite::with($provider)->redirect();
}
public function callback(SocialAccountService $service, $provider)
{
$driver = Socialite::driver($provider);
$user = $service->createOrGetUser($driver, $provider);
$this->auth()->login($user, true);
return redirect()->intended('/');
}
Suppose I want to get $user_role
variable in my callback method. How do I pass it there?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…