Skip to content

fix(auth): preserve authorization endpoint query params#2865

Closed
go165 wants to merge 2 commits into
modelcontextprotocol:mainfrom
go165:go165/fix-oauth-authorization-endpoint-query
Closed

fix(auth): preserve authorization endpoint query params#2865
go165 wants to merge 2 commits into
modelcontextprotocol:mainfrom
go165:go165/fix-oauth-authorization-endpoint-query

Conversation

@go165

@go165 go165 commented Jun 14, 2026

Copy link
Copy Markdown

Summary

  • build OAuth authorization URLs by merging generated OAuth params into the discovered authorization endpoint query instead of always appending a new ?
  • preserve provider-required endpoint parameters such as prompt=select_account
  • add an interaction regression test for an authorization endpoint that already contains query params

Fixes #2776

Validation

  • .venv/bin/python -m pytest tests/interaction/auth/test_authorize_token.py
  • .venv/bin/python -m ruff check src/mcp/client/auth/oauth2.py tests/interaction/auth/test_authorize_token.py
  • .venv/bin/python -m ruff format --check src/mcp/client/auth/oauth2.py tests/interaction/auth/test_authorize_token.py
  • git diff --check

@go165 go165 force-pushed the go165/fix-oauth-authorization-endpoint-query branch from af82afa to 06cd85a Compare June 14, 2026 09:59
@Kludex

Kludex commented Jun 25, 2026

Copy link
Copy Markdown
Member

You've opened a duplicated pull request, please search opened PRs before creating new ones. Duplicated from #2779.

@Kludex Kludex closed this Jun 25, 2026
@modelcontextprotocol modelcontextprotocol locked as resolved and limited conversation to collaborators Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OAuth handler doesn't support redirect URLs with params

2 participants