Skip to content
aj-geddes avatar

Oauth Implementation

Secure OAuth 2.0, OIDC, and JWT authentication guide with reference implementations for Node.js, Python, and Java.

CCM score
35 of 100
skills.sh installs
561
GitHub stars
396
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers OAuth 2.0 and OpenID Connect flows, JWT access and refresh tokens, and SSO integration for web and mobile apps
  • Includes a Node.js OAuth 2.0 server sketch plus Python OpenID Connect and Java Spring Security OAuth reference guides
  • Enforces practices such as PKCE for public clients, token rotation, validated redirect URIs, and avoiding the implicit flow
  • Designed for teams building login systems, third-party API access, social login, or microservice authentication

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill oauth-implementation -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

OAuth Implementation

Table of Contents

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:

// 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();
  }

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, Security
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258

Similar to Oauth Implementation

More Backend & APIs