What problem does it solve?
This Skill prevents fragile or insecure authentication setups by providing a production-grade JWT auth checklist for FastAPI (backend) and React (frontend), including refresh rotation, cookies, CORS, rate limiting, and 2FA wiring.
Core Features & Use Cases
- JWT + HttpOnly cookie security: Access/refresh/TOTP-pending tokens with strict cookie attributes, scoped paths, and payload type validation.
- Complete auth endpoint suite (FastAPI): Login, refresh, logout, current user/admin/client retrieval, and full TOTP enable/disable flow.
- Production hardening: slowapi rate limiting, mass-assignment protections, explicit CORS allowlists, DOMPurify for XSS mitigation, secure password hashing (Argon2id), and recommended security headers.
- Frontend auth reliability (React): credentials include, transparent refresh retry with deduplication, logout cache clearing, route guarding, and safety checks for download URLs.
Quick Start
Use the setup-auth skill with your project context so it generates an implementation plan with team-mode orchestration and then applies the security checklist to your FastAPI + React codebase.