How to set time expire for JWT
I must set time expire for Json web token. I read docs of package , but i don't find make set time expire for it.
Tks all
Give a link to package which you use.
I'm sorry . I use tymon/jwt-auth package
There are file called jwt.php which is the config file to the package, have a look on property called ttl there and set the value.
Just add in .env file
JWT_TTL=1440 //24 hours
(default 60 minutes)
@PHUDEV95 If you want to add dynamic than you must set in .env file or you can set it directly in config/jwt.php
choose as per your requirement from 1 or 2
-
In .env
JWT_TTL=60 // (in minutes)
-
In config/jwt.php
'ttl' => env('JWT_TTL', 60) //defualt 60 (in minutes)
Please or to participate in this conversation.