Auth Module Builder Implement secure, production-ready authentication systems. Core Components Routes : POST /login, /register, /logout, /refresh, /forgot-password Middleware : authenticate, requireAuth, optionalAuth Security : bcrypt hashing, JWT signing, secure cookies, CSRF tokens Session : Redis/DB storage, expiration, refresh tokens Threats : Document common attacks and mitigations JWT Pattern Session Pattern Password Security Security Checklist - [ ] Passwords hashed with bcrypt (cost ≥10) - [ ] JWT secrets from environment, rotated regularly - [ ] HTTPS only in production - [ ] httpOnl…