Invalid JWT should redirect frontend to login page #1927

Closed
opened 2022-07-07 10:15:22 +00:00 by distrobyte · 1 comment

When the Vikunja container is recreated, all the tokens become expired. A user trying to log in after this happens is not directed to the login page, instead a small error is displayed in the bottom corner which says that the JWT is expired.

A potential solution to this would be to redirect to the login page on expired JWT, unsure how feasible this will be as the login page and the "home" page are at the same URL.

When the Vikunja container is recreated, all the tokens become expired. A user trying to log in after this happens is not directed to the login page, instead a small error is displayed in the bottom corner which says that the JWT is expired. A potential solution to this would be to redirect to the login page on expired JWT, unsure how feasible this will be as the login page and the "home" page are at the same URL.
konrad added the
kind/feature
label 2022-07-07 13:06:06 +00:00
Owner

You'll want to set a jwt secret to avoid all sessions getting invalidated when you restart the container.

In the next release (already in unstable) the behaviour was changed to do exactly what you're describing: When the user visits the page with an expired token the login page is displayed instead of an error.

You'll want to set a [jwt secret](https://vikunja.io/docs/config-options/#jwtsecret) to avoid all sessions getting invalidated when you restart the container. In the next release (already in unstable) the behaviour was changed to do exactly what you're describing: When the user visits the page with an expired token the login page is displayed instead of an error.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1927
No description provided.