API - issue for the token lifetime
-
I have an issue for the token lifetime ... it is live just one hour ... how can I control it
-
@mhsabry
are you getting this issue in Bagisto? if yes then show me the error please. -
Sorry, it is not an issue but I mean
Is there a way to control the token life time?
when I try to use the generated token after I login directly it response me with the data but if I use the token after one hour it gives me
Symfony\Component\Routing\Exception\RouteNotFoundException: Route [auth.login] not defined. in file /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 420
-
@mhsabry
please go to the .env file and increase your SESSION_LIFETIME -
I fixed it by adding
JWT_TTL=NULL
in .env file
and comment 'exp',
'required_claims' => [ 'iss', 'iat', // 'exp', 'nbf', 'sub', 'jti', ],
on config/jwt.php file
-
@mhsabry
Great