refactor(McpOAuthClientProvider): do not default to openid scope

This commit is contained in:
Elliott de Launay 2026-03-11 14:00:33 -04:00
parent 6e8b9cfb5a
commit e580b77084
No known key found for this signature in database
GPG key ID: BB899BED766D1806

View file

@ -80,7 +80,7 @@ export class McpOAuthClientProvider implements OAuthClientProvider {
const authMethods: string[] = authServerMeta?.token_endpoint_auth_methods_supported ?? []
const tokenEndpointAuthMethod = authMethods.includes("none") ? "none" : (authMethods[0] ?? "client_secret_post")
const grantTypes: string[] = authServerMeta?.grant_types_supported ?? ["authorization_code", "refresh_token"]
const scopes: string[] = authServerMeta?.scopes_supported ?? ["openid"]
const scopes: string[] = authServerMeta?.scopes_supported ?? []
// Generate a CSRF state token for the OAuth flow.
const state = Array.from(crypto.getRandomValues(new Uint8Array(8)))