I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
Installation Method
Docker
Open WebUI Version
0.6.22
Ollama Version (if applicable)
No response
Operating System
RHEL
Browser (if applicable)
No response
Confirmation
I have read and followed all instructions in README.md.
I am using 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 every relevant configuration, setting, and environment variable used in my setup.
I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
Start with the initial platform/version/OS and dependencies used,
Specify exact install/launch/configure commands,
List URLs visited, user input (incl. example values/emails/passwords if needed),
Describe all options and toggles enabled or changed,
Include any files or environmental changes,
Identify the expected and actual result at each stage,
Ensure any reasonably skilled user can follow and hit the same issue.
Expected Behavior
Users should be able to successfully log in with OIDC SSO integration.
Actual Behavior
After SSO authentication, users are kicked back out to the login page. Subsequent clicks of the login page simply redirects to /auth
Steps to Reproduce
Install with Docker 0.6.22 and configure with the following OIDC flags:
🛡️ Hardened OAuth Security by Removing JWT from URL: Fixed a critical security vulnerability where the authentication token was exposed in the URL after a successful OAuth login. The token is now transferred via a browser cookie, preventing potential leaks through browser history or server logs and protecting user sessions.
But looking at Developer Tools shows that the token isn't being stored in localStorage after a successful SSO login.
Originally created by @jakehlee on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16590
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Docker
### Open WebUI Version
0.6.22
### Ollama Version (if applicable)
_No response_
### Operating System
RHEL
### Browser (if applicable)
_No response_
### Confirmation
- [x] I have read and followed all instructions in `README.md`.
- [x] I am using 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 every relevant configuration, setting, and environment variable used in my setup.**
- [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
- [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps:
- Start with the initial platform/version/OS and dependencies used,
- Specify exact install/launch/configure commands,
- List URLs visited, user input (incl. example values/emails/passwords if needed),
- Describe all options and toggles enabled or changed,
- Include any files or environmental changes,
- Identify the expected and actual result at each stage,
- Ensure any reasonably skilled user can follow and hit the same issue.
### Expected Behavior
Users should be able to successfully log in with OIDC SSO integration.
### Actual Behavior
After SSO authentication, users are kicked back out to the login page. Subsequent clicks of the login page simply redirects to `/auth`
### Steps to Reproduce
Install with Docker `0.6.22` and configure with the following OIDC flags:
```
--env ENABLE_LOGIN_FORM=False \
--env ENABLE_OAUTH_SIGNUP=True \
--env ENABLE_WEBSOCKET_SUPPORT=True \
--env OAUTH_MERGE_ACCOUNTS_BY_EMAIL=False \
--env OAUTH_CLIENT_ID="ABCD" \
--env OAUTH_CLIENT_SECRET="aaaa" \
--env OPENID_PROVIDER_URL="https://aaaa/.well-known/openid-configuration" \
--env OPENID_REDIRECT_URI="https://aaaa/oauth/oidc/callback"\
--env OAUTH_PROVIDER_NAME="SSO" \
--env OAUTH_USERNAME_CLAIM="preferred_username" \
--env OAUTH_PICTURE_CLAIM="" \
```
### Logs & Screenshots
Browser-side error:
`No token found in localStorage, user-join event not emitted`
https://github.com/open-webui/open-webui/blob/cecb3a42b07b2e99ae17faab60ee18083b7c1f34/src/routes/%2Blayout.svelte#L92
### Additional Information
This likely stems from the v0.6.19 change:
> 🛡️ Hardened OAuth Security by Removing JWT from URL: Fixed a critical security vulnerability where the authentication token was exposed in the URL after a successful OAuth login. The token is now transferred via a browser cookie, preventing potential leaks through browser history or server logs and protecting user sessions.
Specifically, https://github.com/open-webui/open-webui/commit/cecb3a42b07b2e99ae17faab60ee18083b7c1f34 looks for the token in `localStorage`
https://github.com/open-webui/open-webui/blob/cecb3a42b07b2e99ae17faab60ee18083b7c1f34/src/routes/%2Blayout.svelte#L86-L94
But looking at Developer Tools shows that the token isn't being stored in `localStorage` after a successful SSO login.
GiteaMirror
added the bug label 2026-04-25 07:24:53 -05:00
I've been investigating this issue as well today. It looks like it was introduced in this commit where @tjbck was attempting to remove the JWT from URL. However, doing so breaks the UI side of things as it expects to have the token in local storage, which I assume the /auth endpoint would have done.
I believe I found the problem in oauth.py on lines 529 & 539 the code is attempting to set cookies on the "response". However, a different response object is returned on line 553 when the RedirectResponse is created.
If I get time I'll attempt to test this tonight. The solution should be prior to line 537 create the RedirectResponse object and set the cookie on it before returning it from the function call
<!-- gh-comment-id:3185641087 -->
@cmbaatz commented on GitHub (Aug 13, 2025):
I've been investigating this issue as well today. It looks like it was introduced in [this commit](https://github.com/open-webui/open-webui/commit/0912a023c2bfca98bde40c2f4a4362cba264caa5) where @tjbck was attempting to remove the JWT from URL. However, doing so breaks the UI side of things as it expects to have the token in local storage, which I assume the /auth endpoint would have done.
I believe I found the problem in [oauth.py](https://github.com/open-webui/open-webui/blob/main/backend/open_webui/utils/oauth.py) on lines [529](https://github.com/open-webui/open-webui/blob/438e5d966f0f64f9ea3feab22724a5bd96a4127b/backend/open_webui/utils/oauth.py#L529) & [539](https://github.com/open-webui/open-webui/blob/438e5d966f0f64f9ea3feab22724a5bd96a4127b/backend/open_webui/utils/oauth.py#L539) the code is attempting to set cookies on the "response". However, a different response object is returned on line [553](https://github.com/open-webui/open-webui/blob/438e5d966f0f64f9ea3feab22724a5bd96a4127b/backend/open_webui/utils/oauth.py#L553) when the RedirectResponse is created.
If I get time I'll attempt to test this tonight. The solution should be prior to line 537 create the RedirectResponse object and set the cookie on it before returning it from the function call
@cmbaatz Should most likely be addressed with 2ed9896dea, testing wanted here!
<!-- gh-comment-id:3185972048 -->
@tjbck commented on GitHub (Aug 13, 2025):
@cmbaatz Should most likely be addressed with 2ed9896dea52278980919dae3528afda8d0559d3, testing wanted here!
No token found in localStorage, user-join event not emitted
did i forget to apply some other changes as well?
=> reverted back to v0.6.18 for now
<!-- gh-comment-id:3193883602 -->
@KarbonatB commented on GitHub (Aug 16, 2025):
i tested the changes of oauth.py https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 with my running instance with OIDC and it still had the same issues
with browser telling:
No token found in localStorage, user-join event not emitted
did i forget to apply some other changes as well?
=> reverted back to v0.6.18 for now
By the way, did you ever try in a private window with clear cache? Unfortunately for some reason Open WebUI doesn't set cache-control for its HTML so you need to do it appropriately with your reverse proxy.
<!-- gh-comment-id:3193884425 -->
@Ithanil commented on GitHub (Aug 16, 2025):
I mean I see the console message too, but login still works - before and after https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 . So I'm wondering what's going on with your setup.
By the way, did you ever try in a private window with clear cache? Unfortunately for some reason Open WebUI doesn't set cache-control for its HTML so you need to do it appropriately with your reverse proxy.
@Ithanil it was indeed my reverse proxy (nginx with custom proxy_cookie_path on the root path) that caused the issues, i remember that i set those up as a workaround for an old version of OWUI
private windows with clear cache did not work prior to that.
<!-- gh-comment-id:3193912037 -->
@KarbonatB commented on GitHub (Aug 16, 2025):
@Ithanil it was indeed my reverse proxy (nginx with custom proxy_cookie_path on the root path) that caused the issues, i remember that i set those up as a workaround for an old version of OWUI
private windows with clear cache did not work prior to that.
but the commit https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 seems to be working
Removing this line, I was able to successfully log in, so I figured this must be a misconfiguration on my end. Dropping httponly was enough, and the following allowed me to log in:
Feel free to close this issue with the next release. Thanks!
<!-- gh-comment-id:3194194330 -->
@jakehlee commented on GitHub (Aug 17, 2025):
Ah, I also have a nginx reverse proxy for serving over HTTPS with:
```
proxy_cookie_flags ~ secure httponly samesite=lax;
```
Removing this line, I was able to successfully log in, so I figured this must be a misconfiguration on my end. Dropping `httponly` was enough, and the following allowed me to log in:
```
proxy_cookie_flags ~ secure samesite=lax;
```
This was with [git-d7363fd](https://github.com/orgs/open-webui/packages/container/open-webui/488755531?tag=git-d7363fd), the most recent dev container at the time, which does include https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 .
Feel free to close this issue with the next release. Thanks!
@tjbck any chance you could publish a new release with this fix in? or alternatively backport this fix to current main?
<!-- gh-comment-id:3196697709 -->
@bbartels commented on GitHub (Aug 18, 2025):
@tjbck any chance you could publish a new release with this fix in? or alternatively backport this fix to current main?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @jakehlee on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16590
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.22
Ollama Version (if applicable)
No response
Operating System
RHEL
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Users should be able to successfully log in with OIDC SSO integration.
Actual Behavior
After SSO authentication, users are kicked back out to the login page. Subsequent clicks of the login page simply redirects to
/authSteps to Reproduce
Install with Docker
0.6.22and configure with the following OIDC flags:Logs & Screenshots
Browser-side error:
No token found in localStorage, user-join event not emittedhttps://github.com/open-webui/open-webui/blob/cecb3a42b07b2e99ae17faab60ee18083b7c1f34/src/routes/%2Blayout.svelte#L92
Additional Information
This likely stems from the v0.6.19 change:
Specifically, https://github.com/open-webui/open-webui/commit/cecb3a42b07b2e99ae17faab60ee18083b7c1f34 looks for the token in
localStoragehttps://github.com/open-webui/open-webui/blob/cecb3a42b07b2e99ae17faab60ee18083b7c1f34/src/routes/%2Blayout.svelte#L86-L94
But looking at Developer Tools shows that the token isn't being stored in
localStorageafter a successful SSO login.@cmbaatz commented on GitHub (Aug 13, 2025):
I've been investigating this issue as well today. It looks like it was introduced in this commit where @tjbck was attempting to remove the JWT from URL. However, doing so breaks the UI side of things as it expects to have the token in local storage, which I assume the /auth endpoint would have done.
I believe I found the problem in oauth.py on lines 529 & 539 the code is attempting to set cookies on the "response". However, a different response object is returned on line 553 when the RedirectResponse is created.
If I get time I'll attempt to test this tonight. The solution should be prior to line 537 create the RedirectResponse object and set the cookie on it before returning it from the function call
@tjbck commented on GitHub (Aug 13, 2025):
@cmbaatz Should most likely be addressed with
2ed9896dea, testing wanted here!@KarbonatB commented on GitHub (Aug 16, 2025):
i tested the changes of oauth.py https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 with my running instance with OIDC and it still had the same issues
with browser telling:
No token found in localStorage, user-join event not emitted
did i forget to apply some other changes as well?
=> reverted back to v0.6.18 for now
@Ithanil commented on GitHub (Aug 16, 2025):
I mean I see the console message too, but login still works - before and after https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 . So I'm wondering what's going on with your setup.
By the way, did you ever try in a private window with clear cache? Unfortunately for some reason Open WebUI doesn't set cache-control for its HTML so you need to do it appropriately with your reverse proxy.
@KarbonatB commented on GitHub (Aug 16, 2025):
@Ithanil it was indeed my reverse proxy (nginx with custom proxy_cookie_path on the root path) that caused the issues, i remember that i set those up as a workaround for an old version of OWUI
private windows with clear cache did not work prior to that.
but the commit https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 seems to be working
@jakehlee commented on GitHub (Aug 17, 2025):
Ah, I also have a nginx reverse proxy for serving over HTTPS with:
Removing this line, I was able to successfully log in, so I figured this must be a misconfiguration on my end. Dropping
httponlywas enough, and the following allowed me to log in:This was with git-d7363fd, the most recent dev container at the time, which does include https://github.com/open-webui/open-webui/commit/2ed9896dea52278980919dae3528afda8d0559d3 .
Feel free to close this issue with the next release. Thanks!
@bbartels commented on GitHub (Aug 18, 2025):
@tjbck any chance you could publish a new release with this fix in? or alternatively backport this fix to current main?
@JoshTheSysEngineer commented on GitHub (Aug 27, 2025):
This worked, thank you.