Skip to content

feat(session): add configurable max concurrent sessions per user with…#922

Open
dominiccreates wants to merge 2 commits into
rinafcode:mainfrom
dominiccreates:feature/private-messaging
Open

feat(session): add configurable max concurrent sessions per user with…#922
dominiccreates wants to merge 2 commits into
rinafcode:mainfrom
dominiccreates:feature/private-messaging

Conversation

@dominiccreates

Copy link
Copy Markdown
Contributor

this pr closes #849 Introduced MAX_SESSIONS_PER_USER (default 5) in env validation.

  • SessionService now reads the limit from ConfigService.
  • Added Redis sorted‑set tracking (user:sessions:{userId}) to enforce a per‑user session cap.
  • Implements LRU eviction: oldest sessions are removed when the limit is exceeded.
  • Updated session removal and migration to keep the sorted set in sync.

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@dominiccreates Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add configurable maximum concurrent sessions per user

1 participant