auth-state-sync
Installation
SKILL.md
Auth State Sync
Covers the non-obvious parts of keeping auth state consistent across tabs, refreshes, and expiry. Skips CRUD auth setup — assumes tokens exist, storage is chosen.
Discovery
Before writing anything, answer:
- Token storage:
localStorage(cross-tab visible) orhttpOnly cookie(invisible to JS)? - Refresh strategy: Silent (iframe/background fetch) or redirect-based?
- Multi-tab logout: Must all tabs log out on one tab's logout?
- Token rotation: Does the server issue a new refresh token on each use?
- Framework: React, Vue, vanilla? (affects broadcast/listener placement)