[GH-ISSUE #6384] issue: OIDC login fails - Boolean variables are not accessed correctly #14343

Closed
opened 2026-04-19 20:44:25 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @nodomain on GitHub (Oct 24, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6384

Bug Report

Installation Method

Docker (AWS ECS)

Environment

  • Open WebUI Version: v0.3.33

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Login via OIDC EntraID works

Actual Behavior:

Internal Server Error happens.

Description

Bug Summary:
Boolean variables are not accessed correctly

Reproduction Details

Steps to Reproduce:
Set the needed OIDC variables in the ECS Task Definition e.g.

    { name = "ENABLE_OAUTH_SIGNUP", value = "true" },           # Boolean value as string
    { name = "OAUTH_MERGE_ACCOUNTS_BY_EMAIL", value = "true" }, # Boolean value as string

Logs and Screenshots

...
 File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/main.py", line 2372, in oauth_callback
    return await oauth_manager.handle_callback(provider, request, response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/utils/oauth.py", line 165, in handle_callback
    if auth_manager_config.OAUTH_MERGE_ACCOUNTS_BY_EMAIL.value:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

Additional Information

The boolean values seem to be accessible without ".value" and hence the call fails.

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @nodomain on GitHub (Oct 24, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/6384 # Bug Report ## Installation Method Docker (AWS ECS) ## Environment - **Open WebUI Version:** v0.3.33 **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Login via OIDC EntraID works ## Actual Behavior: Internal Server Error happens. ## Description **Bug Summary:** Boolean variables are not accessed correctly ## Reproduction Details **Steps to Reproduce:** Set the needed OIDC variables in the ECS Task Definition e.g. ```json { name = "ENABLE_OAUTH_SIGNUP", value = "true" }, # Boolean value as string { name = "OAUTH_MERGE_ACCOUNTS_BY_EMAIL", value = "true" }, # Boolean value as string ``` ## Logs and Screenshots ```text ... File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/main.py", line 2372, in oauth_callback return await oauth_manager.handle_callback(provider, request, response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/utils/oauth.py", line 165, in handle_callback if auth_manager_config.OAUTH_MERGE_ACCOUNTS_BY_EMAIL.value: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... ``` ## Additional Information The boolean values seem to be accessible without ".value" and hence the call fails. ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@nodomain commented on GitHub (Oct 24, 2024):

Console logs:

   GET https://xxx/oauth/microsoft/callback?code=0xxxxtvLFSTk&session_state=bff35b30-41f6-4247-a598-b456dcfd4120 500 (Internal Server Error)
<!-- gh-comment-id:2436440401 --> @nodomain commented on GitHub (Oct 24, 2024): Console logs: GET https://xxx/oauth/microsoft/callback?code=0xxxxtvLFSTk&session_state=bff35b30-41f6-4247-a598-b456dcfd4120 500 (Internal Server Error)
Author
Owner

@tjbck commented on GitHub (Oct 24, 2024):

@Cyb4Black

<!-- gh-comment-id:2436441917 --> @tjbck commented on GitHub (Oct 24, 2024): @Cyb4Black
Author
Owner

@nitinkr0411 commented on GitHub (Oct 25, 2024):

same issue

<!-- gh-comment-id:2436975656 --> @nitinkr0411 commented on GitHub (Oct 25, 2024): same issue
Author
Owner

@tjbck commented on GitHub (Oct 25, 2024):

PR Welcome!

<!-- gh-comment-id:2437074959 --> @tjbck commented on GitHub (Oct 25, 2024): PR Welcome!
Author
Owner

@nodomain commented on GitHub (Oct 25, 2024):

Already getting familiar with it ;)

<!-- gh-comment-id:2437076859 --> @nodomain commented on GitHub (Oct 25, 2024): Already getting familiar with it ;)
Author
Owner

@brantje commented on GitHub (Oct 25, 2024):

If i remember correctly, on dev branch before the release, oauth login was broken, even with the booleans set.
Once a PR is ready i'll gladly test it. Since it seems @nodomain is already working on it :).

<!-- gh-comment-id:2437205526 --> @brantje commented on GitHub (Oct 25, 2024): If i remember correctly, on dev branch before the release, oauth login was broken, even with the booleans set. Once a PR is ready i'll gladly test it. Since it seems @nodomain is already working on it :).
Author
Owner

@nodomain commented on GitHub (Oct 25, 2024):

I think i fixed it, at least works for me...
Since I am totally new to the codebase, I appreciate feedback...

<!-- gh-comment-id:2437255002 --> @nodomain commented on GitHub (Oct 25, 2024): I think i fixed it, at least works for me... Since I am totally new to the codebase, I appreciate feedback...
Author
Owner

@Cyb4Black commented on GitHub (Oct 25, 2024):

Yes, the .value calls both need to be removed. They were actually already present before my larger OAuth changes. I'm pretty sure I removed them while coding, but it seems that some copy-pasting from the old function into my rework brought them back 😅.

So, #6392 is correctly fixing this.

Edit:
Just checked, Had them removed in the past, as I'm currently running an image from an intermediate commit in our productive cluster and it works just fine.

<!-- gh-comment-id:2437468972 --> @Cyb4Black commented on GitHub (Oct 25, 2024): Yes, the .value calls both need to be removed. They were actually already present before my larger OAuth changes. I'm pretty sure I removed them while coding, but it seems that some copy-pasting from the old function into my rework brought them back 😅. So, #6392 is correctly fixing this. Edit: Just checked, Had them removed in the past, as I'm currently running an image from an intermediate commit in our productive cluster and it works just fine.
Author
Owner

@tjbck commented on GitHub (Oct 25, 2024):

Seems to have been resolved, 0.3.34 will be released shortly! Thanks everyone!

<!-- gh-comment-id:2438533348 --> @tjbck commented on GitHub (Oct 25, 2024): Seems to have been resolved, 0.3.34 will be released shortly! Thanks everyone!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#14343