-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
bug: Multiple sessions #1517
Comments
@devsargam please assign this to me. |
@IkramBagban how are you thinking of solving this? |
I am thinking to generate a unique JWT token on every login and store it in user's table. and validate the token on every request. and if the new login occurs then will replace the previous stored token with new token. this will solve the problem. Btw what do you think? Should I store the token in the database, or should I use Redis to store the token since it would be faster? |
@devsargam done. Please check the pr #1520 |
* fix: Enforce single-session login by invalidating previous JWTs on new login #1517 * Update src/middleware.ts --------- Co-authored-by: Sargam <[email protected]>
Describe the bug
I am able to login in 3-4 devices, and I'm not logged out for accessing content from more than 1 device/browser.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Earlier this wasn't the case, I was logged out from previous device/browser, if I access from more than 1 device/browser
The text was updated successfully, but these errors were encountered: