Thursday 13 May 2021

Laravel JWTAuth plugin token time to live

Plugin

https://github.com/tymondesigns/jwt-auth/wiki/Installation


install composer require

config/jwt.php.

 /*
|--------------------------------------------------------------------------
| JWT time to live
|--------------------------------------------------------------------------
|
| Specify the length of time (in minutes) that the token will be valid for.
| Defaults to 1 hour
|
*/

'ttl' => 60,


// Get this value in code

auth()->factory()->getTTL()

No comments:

Post a Comment