Add OIDC fallback for legacy OAuth discovery#2862
Draft
maxpetrusenkoagent wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/.well-known/openid-configurationfor OIDC-only providers.Fixes #1785.
Verification
uv run --frozen pytest tests/interaction/auth/test_discovery.py::test_when_every_prm_probe_fails_the_client_discovers_as_metadata_at_the_server_origin tests/client/test_auth.py::test_oauth_flow_discovers_oidc_metadata_when_prm_is_absent tests/client/test_auth.py::TestOAuthFallback::test_oauth_discovery_legacy_fallback_when_no_prm -quv run --frozen ruff check tests/interaction/auth/test_discovery.py src/mcp/client/auth/utils.py tests/client/test_auth.py && uv run --frozen ruff format --check tests/interaction/auth/test_discovery.py src/mcp/client/auth/utils.py tests/client/test_auth.pyuv run --frozen pyright tests/interaction/auth/test_discovery.py tests/client/test_auth.py src/mcp/client/auth/utils.py./scripts/test(1781 passed, 5 skipped, 1 xfailed, 100% coverage, strict-no-cover clean)uv run --frozen ruff check . && uv run --frozen ruff format --check .uv run --frozen pyrightReview