This skill provides a comprehensive blueprint for implementing industry-standard authentication in MERN (MongoDB, Express, React, Node.js) applications. It handles the complete lifecycle of user sessions, including secure password hashing with bcrypt, short-lived access tokens, and long-lived refresh tokens stored in httpOnly cookies. With built-in support for token rotation, reuse detection, and Axios interceptors for seamless frontend integration, it ensures your application follows modern security best practices while maintaining a smooth user experience.
主な機能
01httpOnly cookie storage for refresh tokens to prevent XSS
02Comprehensive backend middleware for route protection
03Axios interceptors for automatic silent token refresh
040 GitHub stars
05Secure refresh token rotation and reuse detection
06Password hashing using bcrypt with configurable work factors