Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TOKEN_EXPIRES_IN does not seems to be taken into account #843

Open
jpjoux opened this issue Aug 9, 2024 · 1 comment
Open

[Bug]: TOKEN_EXPIRES_IN does not seems to be taken into account #843

jpjoux opened this issue Aug 9, 2024 · 1 comment

Comments

@jpjoux
Copy link

jpjoux commented Aug 9, 2024

Where is the problem occurring?

I encountered the problem while using the application (Frontend)

What browsers are you seeing the problem on?

Chrome, Firefox

Current behaviour

I have deployed planka by setting the variable TOKEN_EXPIRES_IN to 7
After 2 weeks, I am still logged in into planka

Desired behaviour

Automatic logout after the number of days configured in TOKEN_EXPIRES_IN

Steps to reproduce

Configure OIDC and set TOKEN_EXPIRES_IN to 7
After 7 days we are still logged in
The token value does not seems to be taken into account for an automatic login

Other information

No response

@meltyshev
Copy link
Member

Hi! Thanks for reporting this.

The issue seems to be that the currently issued tokens still retain their previous expiration dates, as they are embedded within the tokens themselves. If you log out and log back in, the new issued token will be valid for 7 days.

To invalidate the previous tokens, you need to generate a new SECRET_KEY. This will automatically log out all current users, and when they log in again, they will have a token with a new expiration date.

Seems like we should add this to the documentation, as it doesn't work very obviously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants