Skip to content

Commit 4b26caf

Browse files
authored
Merge branch 'main' into bump-version-101225
2 parents 8fab476 + da2b81e commit 4b26caf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

client/src/lib/auth.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,16 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
121121
return window.location.origin + "/oauth/callback/debug";
122122
}
123123

124+
get redirect_uris() {
125+
// Normally register both redirect URIs to support both normal and debug flows
126+
// In debug subclass, redirectUrl may be the same as debugRedirectUrl, so remove duplicates
127+
// See: https://github.com/modelcontextprotocol/inspector/issues/825
128+
return [...new Set([this.redirectUrl, this.debugRedirectUrl])];
129+
}
130+
124131
get clientMetadata(): OAuthClientMetadata {
125-
// Register both redirect URIs to support both normal and debug flows
126132
return {
127-
redirect_uris: [this.redirectUrl, this.debugRedirectUrl],
133+
redirect_uris: this.redirect_uris,
128134
token_endpoint_auth_method: "none",
129135
grant_types: ["authorization_code", "refresh_token"],
130136
response_types: ["code"],

0 commit comments

Comments
 (0)