This repository was archived by the owner on Aug 11, 2025. It is now read-only.

Description
Current situation
Whenever the authorization token expires, the user is automatically logged out and the login page is shown to the user. However, the user is not informed of what happened.
The desired behavior
Whenever the token expire, the user should be logged out and should be informed with a meaningful message that the session expired.
To Reproduce
We do not need to wait for the token to expire to reproduce this behavior:
- Deploy the local development NMS ->
make deploy
- Register a user, create resources
make hotswap (which makes the token invalid)
- You'll be logged out and see the log in page.
The current state of the code
This is the code that identifies invalid tokens and logs out the user. The changes should be applied everywhere in the code.
if (is401UnauthorizedError(query.error)) {
auth.logout();
}
The difficult part of this task is how to decide whether to show or not the message in the login page according to the situation :
- it's the first time we are logging in
- we explicitly clicked in log out button
- token expired