oauth-auth
Installation
SKILL.md
OAuth and Authentication
Implement secure OAuth2 flows, JWT validation, session management, and authentication patterns.
OAuth2 Authorization Code Flow with PKCE
BAD: No PKCE, state stored in localStorage
// Client initiates OAuth without PKCE
const authUrl = `https://provider.com/oauth/authorize?client_id=${clientId}&redirect_uri=${redirectUri}&response_type=code`;
localStorage.setItem('oauth_state', Math.random().toString());
window.location.href = authUrl;
GOOD: PKCE with httpOnly cookie state
import crypto from 'crypto';