oauth-patterns
OIDC flows, PKCE implementation, token refresh strategies, social login integration, and secure session management.
npx skills add vibeeval/vibecosystem --skill oauth-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# OAuth Patterns Secure authentication and authorization patterns with OAuth 2.0 and OpenID Connect. ## Authorization Code Flow with PKCE ```typescript // PKCE (Proof Key for Code Exchange): required for public clients (SPA, mobile) import crypto from 'crypto' // Step 1: Generate PKCE verifier and challenge function generatePKCE(): { verifier: string; challenge: string } { const verifier = crypto.randomBytes(32).toString('base64url') const challenge = crypto .createHash('sha256') .update(verifier) .digest('base64url') return { verifier, challenge } } // Step 2: Build authorization URL function getAuthorizationUrl(config: OAuthConfig): { url: string; state: string; pkce: PKCE } { const state = crypto.randomBytes(16).toString('hex') const pkce = generatePKCE() const params = new URLSearchParams({ response_type: 'code', client_id: config.clientId, redirect_uri: config.redirectUri, scope: 'openid profile email', state, code_challenge: pkce.challenge, code_challenge_method: 'S256', prompt: 'consent', // Force consent screen nonce: crypto.randomUUID(), // Replay protection }) return { url: `${config.authorizationEndpoint}?${params}`, state, pkce, } } // Step 3: Exchange code for tokens a
- Authorization Code Flow with PKCE
- Token Refresh Strategy
- Social Login Integration
- Session Management
- Checklist
- Anti-Patterns
What does the oauth-patterns skill do?
OIDC flows, PKCE implementation, token refresh strategies, social login integration, and secure session management.
How do I install it?
Run `npx skills add vibeeval/vibecosystem --skill oauth-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From vibeeval/vibecosystem, a repository with 521 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
