Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/oauth-implementation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/oauth-implementation/

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.

From the same set143

app-store-deployment Deploys iOS and Android apps to App Store and Google Play. Guides through code signing, versioning, and pre-release verification. CX Codex +1 564installs bundle-size-optimization Cuts JavaScript and CSS bundle sizes using code splitting and tree shaking. Helps optimize production builds and evaluate heavy dependencies before deployment. CX Codex +1 561installs security-audit-logging A skill that walks your agent through building security audit logging: events, user actions, system changes. Useful when you need logs for compliance or incident review. CX Codex +1 561installs mobile-app-debugging A skill for tracking down failures that only show up on a device: crashes, slow frames, flaky connectivity. CX Codex +1 561installs process-mapping A skill that walks the agent through documenting a current workflow, spotting bottlenecks and designing an improved version. CX Codex +1 552installs integration-testing Helps design and implement integration tests for APIs, databases, message queues, and external services. Useful for validating end-to-end interactions between system components. CX Codex +1 551installs memory-optimization A skill for profiling application memory, finding leaks and cutting the footprint. Useful when a process keeps growing or dies with out of memory. CX Codex +1 544installs real-time-features Equips coding assistants with architectural patterns for WebSockets, Server-Sent Events, and long polling. Useful for chat apps, live feeds, and collaborative workspaces. CX Codex +1 543installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor