You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(client/auth): validate RFC 9207 iss parameter to mitigate mix-up attacks
Adds an optional `iss` argument to `finishAuth()` and validates it against
the cached authorization server metadata before exchanging the code, per
the RFC 9207 §2.4 decision table keyed on
`authorization_response_iss_parameter_supported`. Reference implementation
for SEP-2468.
Copy file name to clipboardExpand all lines: src/client/sse.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -216,15 +216,19 @@ export class SSEClientTransport implements Transport {
216
216
217
217
/**
218
218
* Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
219
+
*
220
+
* @param authorizationCode - The `code` parameter from the redirect URI.
221
+
* @param iss - The `iss` parameter from the redirect URI, if present (RFC 9207). When the authorization server advertises support, omitting this will cause auth to fail.
Copy file name to clipboardExpand all lines: src/client/streamableHttp.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -421,15 +421,19 @@ export class StreamableHTTPClientTransport implements Transport {
421
421
422
422
/**
423
423
* Call this method after the user has finished authorizing via their user agent and is redirected back to the MCP client application. This will exchange the authorization code for an access token, enabling the next connection attempt to successfully auth.
424
+
*
425
+
* @param authorizationCode - The `code` parameter from the redirect URI.
426
+
* @param iss - The `iss` parameter from the redirect URI, if present (RFC 9207). When the authorization server advertises support, omitting this will cause auth to fail.
0 commit comments