fix: user configured oauth scopes should take precedence over discovered scopes (#12088)

This commit is contained in:
Jack Wotherspoon
2025-10-27 12:57:12 -04:00
committed by GitHub
parent c7817aee30
commit 23c906b085
2 changed files with 180 additions and 2 deletions
+2 -2
View File
@@ -630,7 +630,7 @@ export class MCPOAuthProvider {
...config,
authorizationUrl: discoveredConfig.authorizationUrl,
tokenUrl: discoveredConfig.tokenUrl,
scopes: discoveredConfig.scopes || config.scopes || [],
scopes: config.scopes || discoveredConfig.scopes || [],
// Preserve existing client credentials
clientId: config.clientId,
clientSecret: config.clientSecret,
@@ -654,7 +654,7 @@ export class MCPOAuthProvider {
...config,
authorizationUrl: discoveredConfig.authorizationUrl,
tokenUrl: discoveredConfig.tokenUrl,
scopes: discoveredConfig.scopes || config.scopes || [],
scopes: config.scopes || discoveredConfig.scopes || [],
registrationUrl: discoveredConfig.registrationUrl,
// Preserve existing client credentials
clientId: config.clientId,