Unable to implement refresh token code
currently im generating token using this vendor in-build functions. Already implemented the create token functionality, but every token has a expiry time once the token reaches its expiry time i needs to use refresh functionality to regenerate new token. dont know to to implement it.
Here's my existing code for create token,
Authcontroller.php
$token = $user->createToken($request->CLIENT_ID,
$scope_data_array
)->accessToken;
HasApiTokens.php (Laravel/passport inbuilt function)
public function createToken($name, array $scopes = [])
{
log::debug("--inside createToken");
return Container::getInstance()->make(PersonalAccessTokenFactory::class)->make(
$this->getKey(), $name, $scopes
);
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire