Security: Move token storage from localStorage to httpOnly cookie #15

Open
opened 2026-02-17 16:49:26 +00:00 by santhoshj · 0 comments
Owner

Summary

Auth tokens are stored in localStorage which is vulnerable to XSS attacks. Should use httpOnly cookies instead.

Location

  • frontend/src/lib/api.ts:16-28

Acceptance Criteria

  • Backend sets token in httpOnly cookie
  • Frontend reads token from cookie automatically
  • CSRF protection enabled
  • Security review finding
## Summary Auth tokens are stored in localStorage which is vulnerable to XSS attacks. Should use httpOnly cookies instead. ## Location - `frontend/src/lib/api.ts:16-28` ## Acceptance Criteria - [ ] Backend sets token in httpOnly cookie - [ ] Frontend reads token from cookie automatically - [ ] CSRF protection enabled ## Related - Security review finding
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: santhoshj/headroom#15