mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-06 08:18:53 +00:00
refac
This commit is contained in:
parent
3c22afc5a6
commit
349ea4ea9e
1 changed files with 5 additions and 3 deletions
|
|
@ -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'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue