Authentication Patterns

•
604
•

Implements industry-standard authentication and authorization flows including JWT, OAuth2 with PKCE, and RBAC.

This Claude Code skill provides a comprehensive library of secure authentication patterns and authorization architectures for modern web applications. It streamlines the implementation of complex flows like OAuth2 Authorization Code with PKCE, JWT access and refresh token management, and robust Role-Based Access Control (RBAC). By incorporating best practices and explicitly warning against common anti-patterns—such as insecure JWT storage or user enumeration—it helps developers build production-ready, secure identity management systems while significantly reducing the risk of common security vulnerabilities.

主要功能

01Secure middleware for authentication and role-based route protection
02Granular Role-Based Access Control (RBAC) and resource-level permission modeling
03604 GitHub stars
04OAuth2 Authorization Code flow implementation with PKCE for public clients
05Integrated security checklist for password hashing, CSRF, and token validation
06JWT management with secure access and refresh token rotation logic

使用场景

01Building a secure REST API with JWT-based authentication and role-based permissions
02Auditing existing authentication code for security anti-patterns and vulnerabilities
03Implementing 'Sign in with' third-party providers using OAuth2 and PKCE flows