python-sdk
python-sdk copied to clipboard
fix(auth): preserve authorization endpoint query params
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.pygit diff --check