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

marciomansur picture marciomansur  路  3Comments

loic-lopez picture loic-lopez  路  3Comments

harveyslash picture harveyslash  路  3Comments

CBR09 picture CBR09  路  3Comments

functionpointdaniel picture functionpointdaniel  路  3Comments