Jwt-auth: ask : How to set Expire?

Created on 7 Mar 2018  路  3Comments  路  Source: tymondesigns/jwt-auth

I used dev-develop,
How to set expire?
Let's say I have one custom claims, and want to make it expire in 2 hours.

Most helpful comment

There is an option to set the time to live of the token in minutes. It defaults to 1 hour

config/jwt.php

  'JWT_TTL' => env('JWT_TTL', 60) ,

Just add
JWT_TTL=120 to your .env file

All 3 comments

There is an option to set the time to live of the token in minutes. It defaults to 1 hour

config/jwt.php

  'JWT_TTL' => env('JWT_TTL', 60) ,

Just add
JWT_TTL=120 to your .env file

how if some token need to expire in 2 week, and some token need to expire in 2 hour?

Please refer to issue #1491

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kofi1995 picture kofi1995  路  3Comments

lbottoni picture lbottoni  路  3Comments

marciomansur picture marciomansur  路  3Comments

gandra picture gandra  路  3Comments

hfalucas picture hfalucas  路  3Comments