I don\'t get what I\'m doing wrong. I can\'t set token expiration time.
Here are the methods used to update expiration time for all the grant types :
Personal access token:
public function boot(){
$this->registerPolicies();
Passport::routes();
Passport::personalAccessTokensExpireIn(Carbon::now()->addHours(24));
Passport::refreshTokensExpireIn(Carbon::now()->addDays(30));
}
Rest all
public function boot(){
$this->registerPolicies();
Passport::routes();
Passport::tokensExpireIn(Carbon::now()->addHours(24));
Passport::refreshTokensExpireIn(Carbon::now()->addDays(30));
}
Just update the above code in the boot method of AuthServiceProvider.