oauth21-pkce

Automates PKCE enforcement and verification for OAuth 2.1 authorization flows.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/maronnjapan/maronn-openid-provider --skill oauth21-pkce
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oauth21-pkce
Source: https://github.com/maronnjapan/maronn-openid-provider/tree/main/.claude/skills/oauth21-pkce
Command: npx skills add https://github.com/maronnjapan/maronn-openid-provider --skill oauth21-pkce

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PKCE enforces a secure authorization code flow for public clients by preventing code interception and injection, ensuring that the authorization code is bound to the client and the code_verifier remains confidential.

Core Features & Use Cases

  • Code_verifier generation and code_challenge derivation using S256 (SHA-256) to protect authorization flows.
  • Validation of code_verifier against stored code_challenge during token requests, with proper handling of plain vs S256 methods.
  • Clear rejection rules for missing or mismatched parameters and unsupported methods; PKCE exemptions considerations for confidential clients when appropriate.
  • Use Case: Mobile and single-page applications where client secrets cannot be securely stored.

Quick Start

Configure your OAuth 2.1 client to generate a high-entropy code_verifier and compute its S256 code_challenge for every authorization request.

Frequently Asked Questions about oauth21-pkce

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement PKCE for OAuth 2.1 public clients?

To implement PKCE for OAuth 2.1 public clients, generate a high-entropy code_verifier and compute its S256 code_challenge using SHA-256 for every authorization request. This binds the authorization code to the client, preventing code interception and injection attacks.

Why do I need PKCE for single-page and mobile applications?

You need PKCE for single-page and mobile applications because these public clients cannot securely store client secrets. PKCE protects the authorization code flow by ensuring the code is bound to the initial request, preventing interception even if the code is stolen.

What is the difference between S256 and plain code_challenge methods in OAuth?

The S256 method derives the code_challenge by hashing the code_verifier with SHA-256, while the plain method sends the verifier directly. OAuth 2.1 PKCE validation uses S256 to ensure the code_verifier remains confidential throughout the authorization flow.

Can I use PKCE with confidential clients and exempt them from verification?

Yes, PKCE exemptions can be considered for confidential clients when appropriate, as they can securely store secrets. However, enforcing PKCE validation provides an extra layer of security against code injection, and clear rejection rules apply for missing or unsupported parameters.

What happens if the code_verifier is missing or mismatched during the token request?

If the code_verifier is missing or mismatched during a token request, the OAuth 2.1 flow will reject the authorization. The validation process enforces clear rejection rules for missing parameters, mismatched values, and unsupported challenge methods to ensure secure authorization.

How does an authorization server validate a PKCE code_challenge during a token request?

An authorization server validates a PKCE code_challenge by comparing the stored challenge against the received code_verifier. It properly handles plain versus S256 methods, rejecting requests with missing or mismatched parameters to ensure secure token issuance.