medium complexity extracted Security & Audit Confidence: 100%
7
Components
106
Shared
0
User Stories
Yes
Analyzed

Description

Session Management gives administrators visibility into and control over active user sessions across the platform. Administrators can view all currently active sessions for users within their organization, see device and login metadata (device type, login timestamp, last activity), and forcibly terminate sessions — for example, when an employee leaves or a device is reported lost. Users can also view and revoke their own sessions from the mobile app settings. The feature integrates with the JWT refresh token infrastructure to ensure revocation takes effect immediately.

User Flow

Session Management user flow
Click to expand

Analysis

Business Value

Session management addresses a critical operational security gap: without it, administrators have no way to respond to a compromised account or offboard a user completely. In a platform used by coordinators who handle encrypted assignments and sensitive contact data, the ability to instantly revoke access is essential to limiting blast radius when credentials are compromised. For organizations with high volunteer turnover — a defining characteristic of all three workshop organizations — clean offboarding via session termination is a routine operational need, not an edge case. This feature also supports GDPR right-to-erasure workflows by ensuring no active sessions remain after account deletion is initiated.

Implementation Notes

Sessions are tracked in the sessions and refresh_tokens tables, with each refresh token linked to a session record containing device metadata and last-activity timestamp. The SessionService exposes REST endpoints for listing active sessions (scoped by org for Org Admin, cross-org for Global Admin, own sessions for end users), and for revoking individual sessions or all sessions for a user. Revocation works by deleting the refresh_token record and adding the access token's JTI to a short-lived Redis blocklist (or a database blocklist table if Redis is not in scope for MVP) — ensuring the current access token cannot be reused after its TTL. The Session Management Page in the admin portal is a server-rendered Next.js page. The mobile app exposes a 'Manage Sessions' screen in Settings, calling the same API endpoints with user-scoped authorization.

Components (113)

User Interface (3)

Service Layer (2)

Data Layer (2)

Shared Components

These components are reused across multiple features

Service Layer (34)

Data Layer (22)

Infrastructure (38)

infrastructure Keychain/Keystore Adapter low Shared infrastructure JWT Claims Extractor low Shared infrastructure Organization Labels Adapter low Shared infrastructure Keychain/Keystore Adapter low Shared infrastructure Auth API Client medium Shared infrastructure REST API Client medium Shared infrastructure WCAG Accessibility Adapter low Shared infrastructure Registration API Client low Shared infrastructure Accounting API Client high Shared infrastructure PDF Renderer Adapter medium Shared infrastructure File Share Adapter low Shared infrastructure FCM/APNs Adapter high Shared infrastructure Share Sheet Adapter low Shared infrastructure Share Plus Adapter low Shared infrastructure Platform Accessibility Bridge medium Shared infrastructure Semantics Override Adapter high Shared infrastructure URL Launcher Adapter low Shared infrastructure Markdown Content Renderer low Shared infrastructure Network Connectivity Monitor low Shared infrastructure Expense Receipt Storage Adapter low Shared infrastructure Audit Log Writer low Shared infrastructure Feature Flag Checker low Shared infrastructure Logo Upload Adapter low Shared infrastructure Terminology Constants Registry low Shared infrastructure Feature Flag Cache Adapter low Shared infrastructure Org Scope JWT Resolver medium Shared infrastructure Association Audit Logger low Shared infrastructure Token Blocklist medium Shared infrastructure Analytics Tracker low Shared infrastructure SEO Metadata Config low Shared infrastructure Analytics Tracker low Shared infrastructure Analytics Tracker low Shared infrastructure Sales Analytics Tracker low Shared infrastructure Email Provider Adapter low Shared infrastructure Terms of Service Content Provider low Shared infrastructure Legal PDF Asset Provider low Shared infrastructure Consent-Gated Script Loader low Shared infrastructure Legal Page Layout low Shared

User Stories

No user stories have been generated for this feature yet.