Authentication
Manage Sessions
View and manage user sessions
GET
List Sessions
Endpoints
GET /api/auth/sessions
Retrieves all active sessions for the authenticated user. IP addresses are decrypted before returning.Response
Array of active session objects
DELETE /api/auth/sessions
Deletes one or all sessions for the authenticated user.Query Parameters
Optional. Session ID to delete. If omitted, deletes all sessions.
Response
Always
true on successImplementation Details
Code Reference
Status Codes
Success
Missing or invalid authentication token
Example Requests
Get All Sessions
Delete Specific Session
Delete All Sessions
Example Response (GET)
Security Notes
- Only active (non-expired) sessions are returned
- IP addresses are encrypted in database but decrypted for display
- Users can only view/delete their own sessions
- Deleting all sessions effectively logs out the user from all devices
Audit Events
- SESSION_DELETE: Single session deleted (includes sessionId)
- USER_LOGOUT: All sessions deleted (includes
allSessions: true)
List Sessions