Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

oauth2-authentication

БесплатноБез исполняемых скриптовНе проверен

Comprehensive OAuth2 authentication skill covering authorization flows, token management, PKCE, OpenID Connect, and security best practices for modern…

manutejот manutej★ 64 звезды на GitHub16 установок в других каталогах

Об этом скилле

OAuth2 Authentication

A comprehensive skill for implementing secure authentication and authorization using OAuth2 and OpenID Connect. This skill covers all major authorization flows, token management strategies, security best practices, and real-world implementation patterns for web, mobile, and API applications.

When to Use This Skill

Use this skill when:

  • Implementing user authentication in web applications, SPAs, or mobile apps
  • Building API authorization with access tokens and refresh tokens
  • Integrating social login (Google, GitHub, Facebook, Twitter, etc.)
  • Creating secure machine-to-machine (M2M) authentication
  • Implementing single sign-on (SSO) across multiple applications
  • Building an OAuth2 authorization server or identity provider
  • Adding delegated authorization to allow third-party access
  • Securing APIs with token-based authentication
  • Implementing passwordless authentication flows
  • Adding multi-tenant authentication with organization-specific rules
  • Migrating from session-based to token-based authentication
  • Implementing fine-grained access control with OAuth2 scopes

Core Concepts

OAuth2 Fundamentals

OAuth2 is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service. It works by delegating user authentication to the service that hosts the user account and authorizing third-party applications to access that account.

Key Terminology:

  • Resource Owner: The user who owns the data or resources
  • Client: The application requesting access to resources (web app, mobile app, SPA)
  • Authorization Server: Issues access tokens after authenticating the resource owner
  • Resource Server: Hosts protected resources, accepts and validates access tokens
  • Access Token: Short-lived credential used to access protected resources
  • Refresh Token: Long-lived credential used to obtain new access tokens
  • Scope: Permission granted to access specific resources or perform actions
  • Authorization Code: Temporary code exchanged for an access token
  • State Parameter: Prevents CSRF attacks during authorization flow
  • Redirect URI: Callback URL where the user is redirected after authorization

OAuth2 Grant Types (Authorization Flows)

OAuth2 defines several grant types for different use cases:

1. Authorization Code Flow

Most Secure Flow - Recommended for Server-Side Applications

The authorization code flow is the most secure and widely used OAuth2 flow. It involves exchanging an authorization code for an access token on the server side.

Flow Steps:

  1. Client redirects user to authorization server with client_id, redirect_uri, scope, and state
  2. User authenticates and consents to requested permissions
  3. Authorization server redirects back to client with authorization code
  4. Client exchanges code for access token using client secret (server-side)
  5. Client uses access token to access protected resources

When to Use:

  • Traditional server-side web applications
  • Applications that can securely store client secrets
  • When you need maximum security
  • When refresh tokens are required

Security Benefits:

  • Access token never exposed to browser
  • Client authentication via client secret
  • Authorization code is single-use and short-lived
  • State parameter prevents CSRF attacks

2. Authorization Code Flow with PKCE

Secure Flow for Public Clients (SPAs and Mobile Apps)

PKCE (Proof Key for Code Exchange, pronounced "pixy") is an extension to the authorization code flow designed for public clients that cannot securely store client secrets.

Flow Steps:

  1. Client generates code_verifier (random string) and code_challenge (SHA256 hash)
  2. Client redirects to authorization server with code_challenge
  3. User authenticates and consents
  4. Authorization server returns authorization code
  5. Client exchanges code + code_verifier for access token
  6. Server validates code_verifier matches code_challenge

When to Use:

  • Single Page Applications (SPAs)
  • Mobile applications (iOS, Android)
  • Desktop applications
  • Any public client that cannot store secrets

Security Benefits:

  • Prevents authorization code interception attacks
  • No client secret required
  • Protects against malicious apps intercepting redirect
  • Recommended by OAuth2 security best practices (RFC 8252)

3. Client Credentials Flow

Machine-to-Machine Authentication

The client credentials flow is used when the client itself is the resource owner, typically for service-to-service communication.

Flow Steps:

  1. Client authenticates with client_id and client_secret
  2. Authorization server validates credentials
  3. Authorization server issues access token
  4. Client uses token to access protected resources

When to Use:

  • Backend services communicating with APIs
  • Cron jobs or scheduled tasks
  • Microservices authentication
  • CI/CD pipelines accessing APIs
  • System-level operations without user
Полный SKILL.md на GitHub

Установить oauth2-authentication в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.md

FAQ

Что делает скилл oauth2-authentication?

Comprehensive OAuth2 authentication skill covering authorization flows, token management, PKCE, OpenID Connect, and security best practices for modern authentication systems

Как установить скилл oauth2-authentication?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл oauth2-authentication запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить oauth2-authentication с