Skip to content

fix: normalize OAuth redirect URI URL subtypes#2744

Open
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/oauth-redirect-uri-url-subtypes-v2
Open

fix: normalize OAuth redirect URI URL subtypes#2744
he-yufeng wants to merge 1 commit into
modelcontextprotocol:mainfrom
he-yufeng:fix/oauth-redirect-uri-url-subtypes-v2

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • normalize redirect_uris values at the OAuth client metadata boundary
  • keep raw string, AnyUrl, and URL subtype inputs serializing the same way
  • add a regression test for AnyHttpUrl registration followed by AnyUrl redirect validation

To verify

  • .\.venv\Scripts\python.exe -m pytest tests\shared\test_auth.py -q
  • .\.venv\Scripts\python.exe -m ruff check src\mcp\shared\auth.py tests\shared\test_auth.py
  • .\.venv\Scripts\python.exe -m ruff format --check src\mcp\shared\auth.py tests\shared\test_auth.py
  • git diff --check

Refs #2687

@he-yufeng he-yufeng force-pushed the fix/oauth-redirect-uri-url-subtypes-v2 branch from 062b5b4 to ffea4ae Compare May 31, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant