mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 12:35:55 +02:00
refac
This commit is contained in:
@@ -513,10 +513,12 @@ async def get_oauth_client_info_with_static_credentials(
|
|||||||
log.error(f'Error parsing OAuth metadata from {url}: {e}')
|
log.error(f'Error parsing OAuth metadata from {url}: {e}')
|
||||||
continue
|
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
|
scope = None
|
||||||
if oauth_server_metadata and oauth_server_metadata.scopes_supported:
|
|
||||||
scope = ' '.join(oauth_server_metadata.scopes_supported)
|
|
||||||
|
|
||||||
# Determine token_endpoint_auth_method
|
# Determine token_endpoint_auth_method
|
||||||
token_endpoint_auth_method = 'client_secret_post'
|
token_endpoint_auth_method = 'client_secret_post'
|
||||||
|
|||||||
Reference in New Issue
Block a user