Skip to content

Authorization URL validations required by the OAuth 2.1 specification not implemented #3856

Open

Description

@padraig-ohiceadha

Initial Checks

Release line

2.x (current stable)

Description

Similar to the existing handling of resource urls OAuth 2.1 requires that URL fragments not be included in the authorization url and that it not contain any of the params used by the authorization request. Neither of these are currently checked for in _perform_authorization_code_grant
The specification also requires that any existing query params are retained, which are not today ( there is an issue open of this particular part of the issue - #2776 ).

For the OAuth 2.1 specification requirements see section 3.1 of https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1#name-authorization-endpoint

Example Code

Python & MCP Python SDK

Python 3.11.9
2.3.1.dev20

Activity

  1. added
    bugSomething isn't working
    v1Affects the v1.x maintenance line
    v2Affects the v2 line (2.x on main)
    on Nov 13, 2026
  2. media-ctrl commented on Nov 14, 2026

    @media-ctrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv1Affects the v1.x maintenance linev2Affects the v2 line (2.x on main)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions