authentication-security
Installation
SKILL.md
Authentication Security
Quick Navigation: Level 1: Quick Start (5 min) → Level 2: Implementation (30 min) → Level 3: Mastery (Extended)
Level 1: Quick Start (<2,000 tokens, 5 minutes)
Core Principles
- Multi-Factor Always: Require MFA for sensitive operations (TOTP, WebAuthn, hardware keys)
- Secure Tokens: Use RS256 for JWT, never HS256 with shared secrets in distributed systems
- Short-Lived Tokens: Access tokens <15 min, refresh tokens with rotation
- OAuth2 with PKCE: Always use PKCE for SPAs and mobile apps
- Session Security: httpOnly, secure, sameSite cookies with CSRF protection