Passport: How to use Passport with socialite?

Created on 29 Apr 2017  路  3Comments  路  Source: laravel/passport

I want to use passprt with socialite login

Most helpful comment

$stoken = $request->get('token');
$user = Socialite::driver('google')->userFromToken($stoken);

if the user exist
$token = $exist->createToken('')->accessToken;

else create the user from the user object and than
$token = $new->createToken('')->accessToken;

$stoken => social access token
$token => passport access token

All 3 comments

$stoken = $request->get('token');
$user = Socialite::driver('google')->userFromToken($stoken);

if the user exist
$token = $exist->createToken('')->accessToken;

else create the user from the user object and than
$token = $new->createToken('')->accessToken;

$stoken => social access token
$token => passport access token

Closing for lack of activity, hope you got the help you needed :)

You can try using this package :

Try this https://github.com/anandsiddharth/laravel-passport-socialite

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gbgelado picture gbgelado  路  3Comments

cookiejarblush picture cookiejarblush  路  4Comments

rudolfdobias picture rudolfdobias  路  3Comments

Adesubomi picture Adesubomi  路  4Comments

MarkVilludo picture MarkVilludo  路  3Comments