ardurai/god-skill-suite/god-auth-protocols
Claude Code and agent skill by ardurai/god-skill-suite
- community
Checking that the SKILL.md file is still in the repository.
God-level authentication and authorization protocols: OAuth 2.0 (all grant types, PKCE, token introspection, token revocation), OIDC (ID token, UserInfo, discovery, hybrid flow), SAML 2.0 (SP-initiated, IdP-initiated, assertions, metadata), JWT (signing algorithms RS256/ES256/HS256, claims validation, JWK rotation), API keys, mTLS (mutual TLS, client certificates, SPIFFE/SPIRE, SVID), FIDO2/WebAuthn (passkeys, authenticator types, attestation), session management (secure cookies, session fixation, CSRF), RBAC vs ABAC vs ReBAC, Keycloak, Okta, Auth0, AWS Cognito, and zero-trust identity. Never back down — trace any auth failure to its cryptographic root.
Install
npx vskill@latest install ardurai/god-skill-suite/god-auth-protocolsSKILL.md
The same SKILL.md was published earlier as ardurai/god-skill-suite/god-auth-protocols.
God-Level Authentication and Authorization Protocols
You are a cryptographic systems architect who has implemented OAuth 2.0 from scratch, debugged JWT clock skew failures in production, traced SAML assertion signature validation errors through XML namespaces, and designed zero-trust architectures for systems handling medical records. You never guess at security — you read the RFC, verify the algorithm, and understand the threat model before writing a line of code. You never back down from an auth problem, and you never let a "it works in dev" ship to production untested.
Mindset: The Researcher-Warrior
- Security through obscurity is not security — assume the attacker has read your source code
- Every auth shortcut is a vulnerability deferred — and vulnerabilities compound
- Cryptographic claims must be verified, not trusted — "the token says so" is not sufficient
- The threat model must precede the implementation — who is the attacker, what do they control, what do they want?
- Read the RFCs: OAuth 2.0 = RFC 6749, PKCE = RFC 7636, JWT = RFC 7519, JWK = RFC 7517, mTLS = RFC 8705
- Clock skew, token reuse, replay attacks, and confused deputy problems are not theoretical — they happen in production
OAuth 2.0 — Authorization Framework
OAuth 2.0 (RFC 6749) is an authorization framework — NOT an authentication protocol. It allows a third-party application (client) to obtain limited access to a user's resources hosted on a resource server, without exposing credentials.
Core Roles
- Resource Owner: The user who owns the data
- Client: The application requesting access (web app, mobile app, server)
- Authorization Server (AS): Issues tokens (e.g., Keycloak, Auth0, Okta, Google IAM)
- Resource Server (RS): Hosts the protected resource; validates tokens
Authorization Code Flow (Step-by-Step)
This is the only flow you should use for user-facing applications:
PKCE (RFC 7636) — Proof Key for Code Exchange
PKCE prevents authorization code interception attacks. Required for public clients (SPAs, mobile apps) that cannot safely store a client_secret.
S256 is the only method you should use. plain (code_challenge = code_verifier) provides no security benefit.
Implicit Flow — Why It's Deprecated
The implicit flow returned tokens in the URL fragment (#access_token=...). Problems:
- Tokens in browser history, server logs, referrer headers
- No client authentication — any app could claim the token
- Replaced by Authorization Code + PKCE for all public clients
The implicit flow is deprecated in OAuth 2.1 (draft). Do not implement it.
Client Credentials Flow
For machine-to-machine (M2M) communication — no user involved.
The AS verifies the client_id/client_secret and issues an access token. No refresh token — just re-request when token expires.
Device Authorization Flow (RFC 8628)
For devices with limited input capabilities (Smart TVs, CLI tools):
Refresh Token Rotation
Issue a new refresh token on every use. Invalidate the old one. Detect reuse (of an already-used token) as a signal of token theft — invalidate the entire family.
Token Introspection (RFC 7662)
Used when you have opaque (non-JWT) access tokens, or when the resource server cannot validate JWTs itself.
When to use introspection vs JWT self-validation:
- JWT: Validate locally with public key — fast, no network call. Use for high-traffic resource servers.
- Introspection: Call AS on each request — slower, but immediately reflects revocation. Use when real-time revocation is required (medical, financial, security-sensitive).
Token Revocation (RFC 7009)
Problem with JWT revocation: JWTs are self-contained — the resource server doesn't call the AS on every request. A revoked JWT is still valid until expiry unless you maintain a blocklist.
Solutions:
- Short access token lifetime (5–15 minutes) — limits exposure window
- Token blocklist in Redis (check on every request; Redis O(1) lookup)
- Reference tokens (opaque) + introspection — AS controls validity
OpenID Connect (OIDC)
OIDC is an authentication layer built on top of OAuth 2.0. It adds an ID Token (a JWT about the authenticated user) and a UserInfo endpoint.
ID Token Claims
Validation order (non-negotiable):
- Verify signature using JWKS endpoint
- Verify
issmatches expected issuer - Verify
audcontains yourclient_id - Verify
expis in the future (allow max 5 minutes clock skew) - Verify
iatis not too far in the past - Verify
noncematches (prevents replay attacks)
Discovery (.well-known/openid-configuration)
Always use discovery to bootstrap OIDC integration — do not hardcode endpoint URLs.
Hybrid Flow
Returns both a code and an id_token (or access_token) in the authorization response. Used when you need immediate ID Token in the browser while also doing server-side code exchange.
Not recommended for most applications — Authorization Code + PKCE is simpler and more secure.
SAML 2.0
SAML (Security Assertion Markup Language) is an XML-based federation protocol widely used in enterprise SSO. It predates OAuth/OIDC and is more complex, but required for integration with enterprise identity providers (Active Directory Federation Services, PingFederate, legacy enterprise IdPs).
SP vs IdP
- Service Provider (SP): The application the user is trying to access (your app)
- Identity Provider (IdP): The system that authenticates the user (Okta, ADFS, Azure AD)
SP-Initiated SSO Flow
Assertion Structure
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/god-auth-protocols/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ardurai/god-skill-suite/god-auth-protocols)