mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #12470] issue: Microsoft OAUTH Login doesn't work with custom signing keys #16615
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aleprj on GitHub (Apr 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12470
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.0
Ollama Version (if applicable)
No response
Operating System
Ubuntu
Browser (if applicable)
Chrome
Confirmation
README.md.Expected Behavior
When trying to use an Azure login that requires custom signing keys, it should work.
Actual Behavior
It says the email or password provided is incorrect, and there's a message in the console saying "Invalid JSON Web Key Set".
Steps to Reproduce
Logs & Screenshots
The relevant message in the log is: Invalid JSON Web Key Set
(sorry, I didn't keep the full log)
Additional Information
The application currently retrieves the OpenID Connect metadata document from (this is backend/open_webui/config.py):
https://login.microsoftonline.com/{MICROSOFT_CLIENT_TENANT_ID.value}/v2.0/.well-known/openid-configuration
To ensure the jwks_uri in the metadata points to the correct signing key information, we need the appid query parameter:
https://login.microsoftonline.com/{MICROSOFT_CLIENT_TENANT_ID.value}/v2.0/.well-known/openid-configuration?appid={MICROSOFT_CLIENT_ID.value}.
Appending the appid parameter is safe and does not impact applications that do not use custom signing keys, as it will return the common keys (I've tested both scenarios).
https://learn.microsoft.com/en-us/entra/identity-platform/access-tokens
@icsy7867 commented on GitHub (Apr 5, 2025):
I dont know if this is the same issue. open-webui is using oauth2-proxy in the background, and when using ADFS, you have to use either increase the proxy buffer size, or use redis.
And open-webui doesnt have redis storage configured for oauth2-proxy internally. I ended up running oauth2-proxy in another docker container, and setting up redis, and then used header auth.
https://github.com/open-webui/open-webui/issues/11392
If you look the the ADFS configuration, or the Azure (not sure if that is the same thing you are using), but look at the note on the bottom of the page...
https://oauth2-proxy.github.io/oauth2-proxy/configuration/providers/azure