Authentication Patterns
Implements production-ready authentication and authorization mechanisms including JWTs, OAuth2/OIDC, MFA, WebAuthn passkeys, and secure sessions.
The Authentication Patterns skill equips Claude Code with battle-tested implementation patterns for secure user authentication and authorization. It provides concrete Python code structures for handling short-lived JWT access tokens, refresh token rotation with family revocation, OAuth2 Authorization Code flow with PKCE, OpenID Connect ID token validation, TOTP multi-factor authentication, WebAuthn passkeys, and hardened session cookies to prevent common security vulnerabilities like token theft and session fixation.
主要功能
01OAuth2 Authorization Code flow with PKCE and OIDC validation
02Refresh token rotation and token family tracking for theft detection
03Multi-Factor Authentication (MFA) setup and verification using TOTP
04WebAuthn Passkey registration and secure session cookie configuration
05JWT access and refresh token lifecycle management with cryptographic verification
060 GitHub stars
使用场景
01Building robust API authorization systems with rotating JWT tokens and revocation checks
02Modernizing web application security with passwordless WebAuthn passkeys and TOTP MFA
03Integrating social and enterprise identity providers using OAuth2 PKCE and OpenID Connect