This commit is contained in:
Timothy Jaeryang Baek
2026-04-17 12:25:43 +09:00
parent 3c22afc5a6
commit 349ea4ea9e
+5 -3
View File
@@ -513,10 +513,12 @@ async def get_oauth_client_info_with_static_credentials(
log.error(f'Error parsing OAuth metadata from {url}: {e}')
continue
# Determine scope from server metadata if available
# Let the OAuth provider apply its default scopes.
# We intentionally do NOT join all scopes_supported here — that list
# represents every scope the server *can* grant, not what the client
# should request. Requesting all of them is almost always wrong and
# can break providers like Entra ID that require resource-specific scopes.
scope = None
if oauth_server_metadata and oauth_server_metadata.scopes_supported:
scope = ' '.join(oauth_server_metadata.scopes_supported)
# Determine token_endpoint_auth_method
token_endpoint_auth_method = 'client_secret_post'