oauth-implementation · aj-geddes — Claude Code skill: what it does, how to install
Guides the setup of OAuth 2.0, OpenID Connect, JWT tokens, and SSO in web and mobile apps. Useful when configuring social logins or securing backend APIs.
npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a claude-codeWhat oauth-implementation does
This skill guides developers through implementing OAuth 2.0 and OpenID Connect (OIDC) protocols with JWT session handling. The repository includes reference guides in the references/ directory for Node.js, Python, and Java Spring Security. It covers authorization code issuance, refresh token rotation, and client registration workflows.
Security practices are strict here. The guide bans storing tokens in localStorage and warns against the deprecated implicit flow. Public clients must use PKCE, short-lived access tokens, and strict redirect URI validation. For a standalone Node.js server, you must provide JWT_PRIVATE_KEY and JWT_PUBLIC_KEY environment variables. Without asymmetric keys, token signing will fail.
What it helps with
- set up an OAuth 2.0 server using Node.js or Java Spring Security
- implement OpenID Connect (OIDC) for single sign-on
- secure authorization code exchange with PKCE for mobile clients
- configure refresh token rotation and redirect URI validation
Example prompts for the agent
- Implement an OAuth 2.0 authorization server in Node.js using PKCE and JWT tokens
- Configure OpenID Connect authentication flow for our Python backend
- Review our auth flow to ensure tokens are rotated and not stored in localStorage
How to install oauth-implementation
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a claude-code2Manually: put the files in place
~/.claude/skills/oauth-implementation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/oauth-implementation/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a codex2Manually: put the files in place
.agents/skills/oauth-implementation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a cursor2Manually: put the files in place
.cursor/skills/oauth-implementation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts oauth-implementation2Manually: put the files in place
.github/skills/oauth-implementation/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/oauth-implementationManually: put the files in place
.devin/skills/oauth-implementation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about oauth-implementation
How to install oauth-implementation in Claude Code?
Run npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a claude-code. The skill will be placed in ~/.claude/skills/oauth-implementation/SKILL.md.
What does the oauth-implementation skill do?
It provides implementation guides and security best practices for OAuth 2.0, OpenID Connect, and SSO. It helps developers configure JWT generation, token rotation, and protection against open redirects.
Which languages and frameworks are covered in the reference guides?
The references/ directory contains dedicated guides for Node.js, Python, and Java Spring Security. The minimal Node.js example relies on express, jsonwebtoken, bcrypt, and the standard crypto module.
Source text
SKILL.md · MIT
---
name: oauth-implementation
description: >
Implement secure OAuth 2.0, OpenID Connect (OIDC), JWT authentication, and SSO
integration. Use when building secure authentication systems for web and
mobile applications.
---
# OAuth Implementation
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Implement industry-standard OAuth 2.0 and OpenID Connect authentication flows with JWT tokens, refresh tokens, and secure session management.
## When to Use
- User authentication systems
- Third-party API integration
- Single Sign-On (SSO) implementation
- Mobile app authentication
- Microservices security
- Social login integration
## Quick Start
Minimal working example:
```javascript
// oauth-server.js - Complete OAuth 2.0 implementation
const express = require("express");
const jwt = require("jsonwebtoken");
const crypto = require("crypto");
const bcrypt = require("bcrypt");
class OAuthServer {
constructor() {
this.app = express();
this.clients = new Map();
this.authorizationCodes = new Map();
this.refreshTokens = new Map();
this.accessTokens = new Map();
// JWT signing keys
this.privateKey = process.env.JWT_PRIVATE_KEY;
this.publicKey = process.env.JWT_PUBLIC_KEY;
this.setupRoutes();
}
// Register OAuth client
registerClient(clientId, clientSecret, redirectUris) {
this.clients.set(clientId, {
clientSecret: bcrypt.hashSync(clientSecret, 10),
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [Node.js OAuth 2.0 Server](references/nodejs-oauth-20-server.md) | Node.js OAuth 2.0 Server |
| [Python OpenID Connect Implementation](references/python-openid-connect-implementation.md) | Python OpenID Connect Implementation |
| [Java Spring Security OAuth](references/java-spring-security-oauth.md) | Java Spring Security OAuth |
## Best Practices
### ✅ DO
- Use PKCE for public clients
- Implement token rotation
- Store tokens securely
- Use HTTPS everywhere
- Validate redirect URIs
- Implement rate limiting
- Use short-lived access tokens
- Log authentication events
### ❌ DON'T
- Store tokens in localStorage
- Use implicit flow
- Skip state parameter
- Expose client secrets
- Allow open redirects
- Use weak signing keys
© aj-geddes · MIT · aj-geddes/useful-ai-prompts
Similar skills
All skills for Security →oauth-implementation by other authors comes first.