LexikJWTAuthenticationBundle icon indicating copy to clipboard operation
LexikJWTAuthenticationBundle copied to clipboard

Token is invalid when browser closed

Open kirannuclear opened this issue 5 years ago • 1 comments

When I close the browser the token becomes invalid. How do I make the token be valid even when the browser is closed

kirannuclear avatar Jun 06 '19 14:06 kirannuclear

The token is valid until it expires. How do you store the token in browser? Cookie? Some form of javascript local storage?

I think the problem is that you don't store it until it expires but until session closes (e.g. you close your browser). If you store it in cookie, set the expires parameter on the cookie, the default is 0 which means until the browser is closed.

RikudouSage avatar Jul 11 '19 12:07 RikudouSage