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

Reject old JWT tokens #297

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Catharsis68
Copy link
Contributor

@Catharsis68 Catharsis68 commented Mar 7, 2024

This PR fixes an issue - where a previous token could be used for login.

How to reproduce:

  1. Call /v1/login -> token A
  2. use the token A to e.g /v1/Users/me
  3. call /v1/login again
  4. call /v1/Users/me with token A

Expected: the token A is no longer valid - since there is a newer one. Only one active token should be allowed

Actual: You can login with all the tokens as long as there is a valid one in redis

@xquanluu
Copy link
Contributor

xquanluu commented Mar 7, 2024

tested working as described above.

@davehorton
Copy link
Contributor

I see. Currently, when we issue a token it has an expiration and can be used until that time. This seems like a feature request to invalidate any current, valid token when a new token is generated? If so, I don't think we need this in our repo

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

Successfully merging this pull request may close these issues.

3 participants