Skip to content

oauth2: Missing code_verifier parameter in token exchange OpenAPI spec #4099

@chirag1807

Description

@chirag1807

Preflight checklist

Ory Network Project

No response

Describe the bug

Problem

The OAuth2 token exchange endpoint (/oauth2/token) supports the code_verifier parameter (used in PKCE), but it is currently missing from the OpenAPI specification.

This causes:

  • SDKs generated from the spec to not include code_verifier
  • Incomplete API documentation
  • Potential integration issues for clients using PKCE

Expected Behavior

The OpenAPI spec should include code_verifier as a form parameter for the token endpoint.

Reproducing the bug

  1. Check the OpenAPI (Swagger) specification for /oauth2/token
  2. Inspect the parameters defined under oauth2TokenExchange
  3. Observe that code_verifier is not present in the spec

However, Hydra accepts code_verifier as part of the token request
when using PKCE.

Proposed Fix

A fix has been proposed in: #4098

Version

v26.2.0

On which operating system are you observing this issue?

Windows

In which environment are you deploying?

None

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions