mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
handling no claim received when nested expected
This commit is contained in:
parent
8e4776ada1
commit
79b9c8a677
1 changed files with 1 additions and 1 deletions
|
|
@ -2253,7 +2253,7 @@ async def oauth_callback(provider: str, request: Request, response: Response):
|
|||
elif webui_app.state.config.ENABLE_OAUTH_ROLE_MAPPING:
|
||||
oauth_claim = webui_app.state.config.OAUTH_ROLES_CLAIM
|
||||
oauth_roles = user_data.get(oauth_claim) # Works for simple claims with no nesting
|
||||
if "." in oauth_claim:
|
||||
if oauth_roles and "." in oauth_claim:
|
||||
# Implementation to handle nested claims of arbitrary depth
|
||||
nested_claims = oauth_claim.split(".")
|
||||
claim_data = user_data.get(nested_claims[0])
|
||||
|
|
|
|||
Loading…
Reference in a new issue