Register oauth clients with a preferred auth method - #642
Conversation
6246f6a to
2ce233e
Compare
|
cc @felixweinberger, @ochafik, @jaredhanson - let me know if you have thoughts and feedback! |
|
Closing: v1 is deprecated. Thank you for this contribution, and apologies for the long wait for a response. v1 will receive security fixes only. We reviewed every open v1 PR for security impact before closing — see the backlog triage in #1819 — and a small number were retained for a final If the underlying problem still exists in v2, we'd genuinely like to know. Please open an issue describing it against v2. Note that we accept external contributions as issues rather than pull requests — maintainers handle design and implementation through a prompt-driven workflow. See Thanks again for taking the time to contribute to the Inspector. |
This PR registers oauth clients with a
token_endpoint_auth_methodas preferred by the authorization server metadatatoken_endpoint_auth_methods_supportedfield, instead of always sendingnone.If the authorization server expresses multiple preferences in
token_endpoint_auth_methods_supported, the first match from:client_secret_basic, client_secret_post, noneis picked. If no preference is expressed,noneis picked. Unknown values are ignored.I don't see any tests around client registration, unfortunately. I could add some with a little help from you experts!
Motivation and Context
Some MCP clients (e.g. vscode) don't currently support any token endpoint auth (microsoft/vscode#257277), but the MCP SDKs do (modelcontextprotocol/typescript-sdk#720). Without this change, one has to guess at when clients actually support token endpoint auth based on other metadata or simply always use None.
How Has This Been Tested?
I tested this locally with my MCP server and authorization server, stepping through the inspector's guided flow to check that client registration matches expectations.
Breaking Changes
No, existing authorization server preferences continue to be respected.
Types of changes
Checklist
Additional context