This skill provides a comprehensive, production-ready implementation of JSON Web Token (JWT) authentication specifically tailored for the MERN (MongoDB, Express, React, Node.js) stack. It automates the setup of secure authentication flows, including registration, login, and logout, while prioritizing security through short-lived access tokens and long-lived refresh tokens stored in httpOnly cookies. By including advanced rotation mechanisms and reuse detection, it protects against common vulnerabilities like XSS and token theft, making it an essential blueprint for developers building secure, scalable web applications with Claude Code.
주요 기능
01Secure cookie management using httpOnly, Secure, and SameSite flags
020 GitHub stars
03Axios interceptors for seamless silent token refresh on the frontend
04Server-side session invalidation and secure password hashing with bcrypt
05Dual-token architecture with short-lived access and long-lived refresh tokens
06Automatic refresh token rotation and reuse detection/revocation