Skip to content

OAuth client: harden SEP-2352/SEP-2350 edge cases; fix conformance comment - #2936

Merged
maxisbey merged 4 commits into
mainfrom
bughunter/followups-2026-06-20
Jun 22, 2026
Merged

OAuth client: harden SEP-2352/SEP-2350 edge cases; fix conformance comment#2936
maxisbey merged 4 commits into
mainfrom
bughunter/followups-2026-06-20

Only bind issuer when registration targets the discovered AS

a808d14
Select commit
Loading
Failed to load commit list.
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

See this annotation in the file changed.

@claude 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