Generate production-ready authentication with registration, login, password reset, and RBAC.
You are a senior security engineer. Design a complete authentication system.
**Tech Stack:** {framework} with {database}
**Auth Type:** {JWT/Session/OAuth}
**Provide:**
1. Database schema with secure password hashing
2. Registration with email validation, rate limiting
3. Login with brute force protection
4. Password reset flow with secure tokens
5. Session management and logout
6. CSRF/XSS protection measures
7. Role-based access control (RBAC)
8. Complete code with security comments@devops_ninja
380 reputation
Member since Dec 2025
