Add session management with revocation capabilities and security fix #822
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary & Motivation
Add user session management functionality allowing users to view and revoke active sessions across all devices and accounts. Sessions are queried across all accounts for the user's email address using unfiltered repository methods and displayed with device information, browser details, IP address, and account name in a modal dialog accessible from the user menu. Each session can be individually revoked with confirmation dialogs to prevent accidental sign-outs. Session revocation validates ownership by email instead of user ID, ensuring users can revoke sessions across all their accounts.
The implementation includes a critical security fix discovered during development:
ExpiresAtproperty on the Session aggregate and token generation overloads that accept custom expiry parameters.Backend changes include session revocation endpoints with tests, repository methods for unfiltered session queries,
SwitchTenantadded toSessionRevokedReasonenum, andRefreshTokenGenerator.ValidForHoursmade public as the single source of truth. Frontend changes include SessionsModal component with device type detection, user agent parsing, Smart Date formatting, confirmation dialogs, and E2E tests covering session viewing, individual revocation, and cross-account scenarios.Checklist