python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

fix(auth): preserve authorization endpoint query params

Open go165 opened this issue 5 months ago • 0 comments

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 avatar Jun 14 '26 09:06 go165