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

fix: multiple login session bug #1517 #1520

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

IkramBagban
Copy link
Contributor

fix: Enforce single-session login by invalidating previous JWTs on new login #1517

PR Fixes:

  • 1 Generate Unique JWT Token on every login
  • 2 invalidate previous JWTs upon a new login.
  • 3 Ensure that only one active session exists per user.

Resolves #[1517]

Checklist before requesting a review

  • [✅] I have performed a self-review of my code
  • [✅] I assure there is no similar/duplicate pull request regarding same issue

@IkramBagban
Copy link
Contributor Author

@devsargam, @hkirat, @siinghd hey, if this PR fix the problem well please merge it

src/middleware.ts Outdated Show resolved Hide resolved
@devsargam
Copy link
Collaborator

@IkramBagban thank you! Works perfectly!

@devsargam devsargam merged commit ed2beb1 into code100x:main Dec 6, 2024
1 check failed
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.

2 participants