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

[Suggestion] Add expiry time for token in gui #266

Closed
ryomahan opened this issue Jan 5, 2023 · 1 comment
Closed

[Suggestion] Add expiry time for token in gui #266

ryomahan opened this issue Jan 5, 2023 · 1 comment

Comments

@ryomahan
Copy link
Contributor

ryomahan commented Jan 5, 2023

Now the token expiry time is only sotred in the backend(redis), when the page is operated again after a long time without operation, the page will have a request 401 error first and then jump to the login page, the better solution should be to store a token expiry time in the frontend and check if token is expired when we call api(need auth) and turn to login page if token is expired.

there are two options:

  1. change to use cookie save token, the benefit is that the cookie comes with an expiration time, the downside is that some of the code needs to be rewritten.
  2. add a timestamp for token use localStorage, the benefit is don't need rewrite code, the downside is we need to maintain the expiry time manually.
@atompie
Copy link
Collaborator

atompie commented Feb 22, 2023

Done in 0.8.0.5

@atompie atompie closed this as completed Feb 22, 2023
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