Redirect to login page when token is invalid, inactive or expired #1341
Labels
bug
An issue with correctness, stability, performance, or API conformance.
Milestone
Context
The dashboard throws an error when the token is inactive and there is a session already opened.
Steps To Reproduce
lhctl
~/.config/littlehorse.config
fileDashboard
.env
fileSetup with keycloak
Run server
Run dashboard and login
Then login into the dashboard http://localhost:3000/api/auth/signin?callbackUrl=/
User:
user
Pass:
password
Close session in keycloak
Go to http://localhost:8888/admin/master/console/#/lh/sessions and close the session:
Important: restart the server
At this point there is a token in the frontend and in the lh server. But that token if invalid now.
Is you restart the server then when it receives the token again it's going to validate it and throws an error:
In the backend:
Expected Behavior
If the token is invalid it should not show an error to the user, it should redirect to the login page.
It should log an error or export an error metric.
Additional Context
Proposal:
Components
Dashboard
The text was updated successfully, but these errors were encountered: