skill-auth-oauth2

Implement OAuth2 and OpenID Connect authorization code flows with PKCE and JWKS token validation.

4|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/ryan-nguyen-01/agent-platform --skill skill-auth-oauth2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-auth-oauth2
Source: https://github.com/ryan-nguyen-01/agent-platform/tree/main/.claude/skills/skill-auth-oauth2
Command: npx skills add https://github.com/ryan-nguyen-01/agent-platform --skill skill-auth-oauth2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OAuth2/OIDC integration is complex and error-prone without proper PKCE support, token handling, and provider configuration.

Core Features & Use Cases

  • PKCE-enabled authorization code flow for public clients (SPA, mobile apps)
  • Token exchange and ID/token verification against provider JWKS
  • Provider integration and secure user account linking across multiple providers
  • Security patterns: state validation for CSRF protection, safe storage of PKCE verifiers, and minimal secret exposure

Quick Start

Configure your backend to implement the authorization code flow with PKCE, verify tokens via JWKS, and securely integrate a provider for user sign-in.

Frequently Asked Questions about skill-auth-oauth2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement OAuth2 authorization code flow with PKCE for a public client?

OAuth2 authorization code flow with PKCE requires generating a code verifier and challenge, redirecting users for consent, and exchanging the authorization code plus verifier for access tokens. This pattern secures public clients like SPAs and mobile apps without exposing client secrets.

What is the best way to validate OAuth2 ID tokens using JWKS?

Validating OAuth2 ID tokens using JWKS involves fetching the provider's public keys, matching the token's key ID, verifying the cryptographic signature, and checking claims like expiration and issuer. This ensures tokens are authentic and untampered.

Does OAuth2 token exchange work for linking user accounts across multiple providers?

OAuth2 token exchange supports linking user accounts across multiple providers by exchanging an incoming token for a new one representing the same subject. Backend services handle this integration to unify identities and securely manage provider-specific credentials.

When do I need PKCE and state validation for CSRF protection in OAuth2?

PKCE and state validation for CSRF protection are needed whenever implementing OAuth2 authorization code flows, especially for public clients. State parameters bind the request to the user session, while PKCE prevents authorization code interception attacks.

How should I securely store PKCE verifiers and handle client secrets server-side?

Securely storing PKCE verifiers and handling client secrets server-side involves keeping secrets out of frontend code and using short-lived, session-bound storage for verifiers. This minimal secret exposure prevents interception during the OAuth2 token exchange process.