OAuth client: harden SEP-2352/SEP-2350 edge cases; fix conformance comment - #2936
Merged
Claude / Claude Code Review
completed
Jun 22, 2026 in 17m 23s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/mcp/client/auth/oauth2.py:645-654 |
Issuer still stamped when discovered metadata lacks registration_endpoint |
Annotations
Check warning on line 654 in src/mcp/client/auth/oauth2.py
claude / Claude Code Review
Issuer still stamped when discovered metadata lacks registration_endpoint
When the discovered AS metadata omits the optional `registration_endpoint`, `create_client_registration_request` still falls back to the resource origin's `/register`, yet the new gate (`oauth_metadata is not None`) stamps the PRM-advertised issuer on that fallback registration — so the new comment's guarantee that "the registration request below actually targets that issuer's registration_endpoint" doesn't hold on this path. Non-blocking nit (the runtime behavior here is unchanged from before t
Loading