Threat model and trust boundaries
JavaScript-accessible storage is readable by injected scripts. HttpOnly cookies reduce direct script access but require careful SameSite, CSRF and cross-origin design; no storage choice removes the need to prevent XSS.
- Identify actors, assets and trust boundaries
- Choose controls that address the stated threat
- Test failure behavior and recovery paths