Agent Skill
2/7/2026

oauth21-compliance

OAuth 2.1 compliance checklist for authorization servers. Use when implementing OAuth 2.1 beyond OpenID Connect Basic OP requirements, verifying OAuth 2.1 specific features, or understanding differences from OAuth 2.0. Covers all OAuth 2.1 draft-ietf-oauth-v2-1-14 requirements not in Basic OP.

M
maronnjapan
0GitHub Stars
1Views
npx skills add maronnjapan/maronn-openid-provider

SKILL.md

Nameoauth21-compliance
DescriptionOAuth 2.1 compliance checklist for authorization servers. Use when implementing OAuth 2.1 beyond OpenID Connect Basic OP requirements, verifying OAuth 2.1 specific features, or understanding differences from OAuth 2.0. Covers all OAuth 2.1 draft-ietf-oauth-v2-1-14 requirements not in Basic OP.

name: oauth21-compliance description: OAuth 2.1 compliance checklist for authorization servers. Use when implementing OAuth 2.1 beyond OpenID Connect Basic OP requirements, verifying OAuth 2.1 specific features, or understanding differences from OAuth 2.0. Covers all OAuth 2.1 draft-ietf-oauth-v2-1-14 requirements not in Basic OP.

OAuth 2.1 Compliance Checklist

Requirements for OAuth 2.1 compliance beyond OpenID Connect Basic OP certification.

Key Differences from OAuth 2.0

FeatureOAuth 2.0OAuth 2.1
PKCEOptional extensionREQUIRED
Implicit grantSupportedREMOVED
Password grantSupportedREMOVED
redirect_uri matchFlexibleExact string match
Query tokenDiscouragedPROHIBITED
Refresh (public)No constraintSender-constrained/rotation
redirect_uri in tokenOptionalRemoved

PKCE Requirements

Authorization Server

RequirementPriority
Support code_challenge parameterMUST
Support code_challenge_method=S256MUST (MTI)
Support code_challenge_method=plainMAY
Reject unsupported method with invalid_requestMUST
Associate challenge with issued codeMUST
Require code_verifier if challenge presentMUST
Validate verifier against stored challengeMUST
Reject public clients without challengeMUST
Not expose challenge in responseMUST NOT

Exemption Conditions

PKCE MAY be skipped only when BOTH:

  1. Client is confidential
  2. Client properly implements OIDC nonce

Even then, PKCE is RECOMMENDED.

Token Endpoint Requirements

RequirementPriority
Accept POST method onlyMUST
Accept application/x-www-form-urlencodedMUST
Ignore unrecognized parametersMUST
Include Cache-Control: no-storeMUST
Support client credentials in bodyMUST
Support CORS for browser appsSHOULD
Validate PKCE on code exchangeMUST
Enforce single-use codesMUST
Revoke tokens on code reuseSHOULD

Authorization Code Requirements

RequirementPriority
Maximum 10 minute lifetimeRECOMMENDED
Bind to client_idMUST
Bind to code_challengeMUST
Bind to redirect_uriMUST
Single useMUST
Revoke tokens on second valid requestSHOULD

Bearer Token Requirements

RequirementPriority
Support Authorization headerMUST (RS)
Query parameter transmissionMUST NOT
Ignore query parameter tokensMUST (RS)
Form body when conditions metMAY

Refresh Token Requirements

RequirementPriority
Bind to issued clientMUST
Bind to scope and resourcesMUST
Verify binding on useMUST
Public client: sender-constrained OR rotationMUST
Confidential client: require authenticationMUST
Not guessable/generatableMUST

Redirect URI Requirements

RequirementPriority
Register complete URIMUST
Exact string comparisonMUST
Allow loopback port variationMUST
HTTPS required (except loopback)MUST

HTTP Redirect Requirements

RequirementPriority
Not use 307 for credential redirectsMUST NOT
Use 303 for such redirectsSHOULD

Removed Features (MUST NOT Implement)

FeatureReason
response_type=tokenToken leakage, no sender-constraint
grant_type=passwordExposes credentials, no MFA
Query parameter tokensLeakage via logs, history

Token Response Requirements

FieldRequirement
access_tokenREQUIRED
token_typeREQUIRED (case-insensitive)
expires_inRECOMMENDED
scopeREQUIRED if different, RECOMMENDED if same
refresh_tokenOPTIONAL

Error Response Requirements

Error Codes

ErrorUse Case
invalid_requestMissing/invalid parameter
invalid_clientClient auth failed
invalid_grantInvalid code/token
unauthorized_clientNot authorized for grant
unsupported_grant_typeGrant not supported
invalid_scopeInvalid scope
server_errorInternal error
temporarily_unavailableTemporary overload

Error Field Constraints

  • error: %x20-21 / %x23-5B / %x5D-7E
  • error_description: %x20-21 / %x23-5B / %x5D-7E
  • error_uri: URI-reference syntax

Security Recommendations

RequirementPriority
Use TLS 1.3RECOMMENDED
Validate TLS certificatesMUST
Sender-constrained tokens (DPoP/mTLS)SHOULD
End-to-end TLSRECOMMENDED
Short-lived access tokensSHOULD
Audience restrictionSHOULD
Minimum scopeSHOULD

Checklist by Component

Authorization Endpoint

  • Support code_challenge
  • Support code_challenge_method=S256
  • Reject unsupported methods
  • Store challenge with code
  • Exact redirect_uri matching
  • Loopback port exception
  • Not use 307 redirect
  • Include iss in response (optional)

Token Endpoint

  • POST only
  • Cache-Control: no-store
  • CORS headers for browser apps
  • Validate code_verifier
  • Single-use codes
  • Revoke on reuse
  • Client credentials in body
  • Proper error responses

Bearer Token Handling

  • Authorization header support
  • No query parameter support
  • Form body (conditional)
  • TLS required

Refresh Token Handling

  • Client binding
  • Scope/resource binding
  • Sender-constraint (public) OR rotation
  • Client auth (confidential)

Not Implemented

  • Implicit grant removed
  • Password grant removed
  • Query token removed

Compliance Testing

Unlike OpenID Connect, there is no official OAuth 2.1 certification program. Verify compliance by:

  1. Manual review against specification
  2. Security testing
  3. Interoperability testing with clients
  4. Reviewing implementation against this checklist

Related Skills

  • oauth21-pkce - Detailed PKCE implementation
  • oauth21-token-endpoint - Token endpoint specifics
  • oauth21-bearer-token - Bearer token handling
  • oauth21-refresh-token - Refresh token requirements
  • oauth21-security - Security requirements
Skills Info
Original Name:oauth21-complianceAuthor:maronnjapan