samedi 14 juillet 2018

Create Refresh token like "createToken" method with User Model

I want to create mobile authentication with SMS authorization code. so i need to create token for each user without use Passport APIs. thus I create personal client according to the following:

php artisan passport:client --personal
> Customer

and try to create token with "createToken"

$user = User::find(1);
$token = $user->createToken('Customer');
return $token->toArray();

it was created but i don't have any expire token to refresh token when it will be expired.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire