Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Oauth Implementation

  • 504 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

oauth-implementation is a Claude skill that implements secure OAuth 2.0, OpenID Connect, JWT authentication, refresh tokens, session management, and SSO integration for web, mobile, and API applications.

About

oauth-implementation is a Claude skill from aj-geddes/useful-ai-prompts that guides secure auth system construction using OAuth 2.0 and OpenID Connect with JWT access tokens, refresh tokens, and session management. It applies when building user authentication, third-party API authorization, or single sign-on across web and mobile clients. The skill includes overview, quick start, reference guides, and best practices for token lifecycle and secure flows. Developers reach for oauth-implementation when adding login to a new API, integrating an identity provider, or replacing ad-hoc session cookies with standards-based OIDC and JWT patterns.

  • Complete OAuth 2.0 and OpenID Connect (OIDC) server implementation
  • JWT token handling with refresh tokens and secure session management
  • Supports user authentication, third-party API integration, SSO, social login, and microservices security
  • Production-ready patterns for web and mobile applications
  • Includes registration, authorization code, and token exchange flows

Oauth Implementation by the numbers

  • 504 all-time installs (skills.sh)
  • Ranked #825 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill oauth-implementation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs504
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you implement OAuth 2.0 and OIDC securely?

Add secure OAuth 2.0, OpenID Connect, JWT, and SSO flows to web, mobile, or API products.

Who is it for?

Backend developers adding standards-based authentication to web apps, mobile clients, or APIs with third-party identity provider integration.

Skip if: Teams needing passwordless magic-link-only auth with no OAuth provider or projects with existing fully configured auth libraries requiring no changes.

When should I use this skill?

Code needs OAuth 2.0 flows, OpenID Connect login, JWT tokens, refresh tokens, or SSO across web or mobile clients.

What you get

OAuth 2.0 and OIDC auth flows, JWT and refresh token handling, session management, and SSO integration code

  • auth flow implementation
  • token handling module
  • SSO integration config

Files

SKILL.mdMarkdownGitHub ↗

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

  // 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:

GuideContents
Node.js OAuth 2.0 ServerNode.js OAuth 2.0 Server
Python OpenID Connect ImplementationPython OpenID Connect Implementation
Java Spring Security OAuthJava 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

Related skills

How it compares

Pick oauth-implementation for full OAuth/OIDC/JWT flow design rather than API key-only authentication or frontend-only login UI skills.

FAQ

What standards does oauth-implementation cover?

oauth-implementation covers OAuth 2.0, OpenID Connect, JWT authentication, refresh tokens, secure session management, and SSO integration for web and mobile applications.

When should developers use oauth-implementation?

oauth-implementation applies when building user authentication systems, integrating third-party APIs that require OAuth, or adding single sign-on across web and mobile clients.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.