phplaraveloauth-2.0bearer-tokenlaravel-passport

Laravel passport non-expiring tokens


We're having Laravel with Passport setup for OAuth2, it's working fine in all ways.

Does Laravel supports non-expiring bearer tokens? If so, what is the way to have non-expiring bearer tokens?

We're using authorisation code grant.


Solution

  • You can use Personal Access Token in passport

    According to official documentation

    Personal access tokens are always long-lived. Their lifetime is not modified when using the tokensExpireIn or refreshTokensExpireIn methods.