Design login sessions, refresh tokens, device binding, and logout everywhere. Token theft and replay are primary threats.
Functional requirements
- Issue access and refresh tokens with rotation
- Revoke sessions and devices
- Detect reuse of stolen refresh tokens
- SSO hooks for enterprise IdP
Non-functional requirements
- Low-latency session validation on every request
- Secure storage recommendations for clients
- Audit trail for auth events