[GH-ISSUE #11606] issue: oauth state does not sync between replicas #16292

Closed
opened 2026-04-19 22:15:30 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @computerdane on GitHub (Mar 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11606

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.5.20

Ollama Version (if applicable)

No response

Operating System

Linux

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 listed steps to reproduce the bug in detail.

Expected Behavior

OAuth state should sync between multiple instances that are behind a load balancer

Actual Behavior

OAuth state does not persist, and logins fail

Steps to Reproduce

  1. Deploy multiple instances of open-webui with an OIDC integration
  2. Attempt to log in

Logs & Screenshots

N/A

Additional Information

Related to https://github.com/open-webui/open-webui/issues/10365

I am deploying open-webui in Fargate, and when I have multiple instances running and attempt to login, it fails since it is behind a round-robin load balancer and the other containers' states are not in sync with the state of the container that initiated the login.

Possible fix on my branch: 85bdb4ac67. Once I am able to test this change I will submit a PR and link it to this issue.

Originally created by @computerdane on GitHub (Mar 12, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11606 ### 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 v0.5.20 ### Ollama Version (if applicable) _No response_ ### Operating System Linux ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior OAuth state should sync between multiple instances that are behind a load balancer ### Actual Behavior OAuth state does not persist, and logins fail ### Steps to Reproduce 1. Deploy multiple instances of open-webui with an OIDC integration 2. Attempt to log in ### Logs & Screenshots N/A ### Additional Information Related to https://github.com/open-webui/open-webui/issues/10365 I am deploying open-webui in Fargate, and when I have multiple instances running and attempt to login, it fails since it is behind a round-robin load balancer and the other containers' states are not in sync with the state of the container that initiated the login. Possible fix on my branch: https://github.com/computerdane/open-webui/commit/85bdb4ac67c5272e65b60a30bfb24dc7d22f6ec3. Once I am able to test this change I will submit a PR and link it to this issue.
GiteaMirror added the bug label 2026-04-19 22:15:30 -05:00
Author
Owner

@computerdane commented on GitHub (Mar 13, 2025):

Ok, turns out I just needed to set the WEBUI_SECRET_KEY environment variable for all of the containers to the same thing, since the Docker image randomizes it. I didn't even need the Redis cache for authlib or anything

<!-- gh-comment-id:2722224118 --> @computerdane commented on GitHub (Mar 13, 2025): Ok, turns out I just needed to set the `WEBUI_SECRET_KEY` environment variable for all of the containers to the same thing, since the Docker image randomizes it. I didn't even need the Redis cache for authlib or anything
Author
Owner

@Ithanil commented on GitHub (Mar 15, 2025):

@computerdane Hit the same issue, same fix. Would be good to add a hint to the documentation of WEBUI_SECRET_KEY.

<!-- gh-comment-id:2726292093 --> @Ithanil commented on GitHub (Mar 15, 2025): @computerdane Hit the same issue, same fix. Would be good to add a hint to the documentation of `WEBUI_SECRET_KEY`.
Author
Owner

@computerdane commented on GitHub (Mar 15, 2025):

@Ithanil 108d01c73d looks like this PR will update the docs accordingly

<!-- gh-comment-id:2726697190 --> @computerdane commented on GitHub (Mar 15, 2025): @Ithanil https://github.com/open-webui/docs/pull/448/commits/108d01c73dd96259caf45fe2739c60b0b871d55c looks like this PR will update the docs accordingly
Author
Owner

@taylorwilsdon commented on GitHub (Mar 15, 2025):

@computerdane Hit the same issue, same fix. Would be good to add a hint to the documentation of WEBUI_SECRET_KEY.

There are no published docs on Open-WebUI's site about this currently, but I have a PR that adds them ready to go here https://github.com/open-webui/docs/pull/448

<!-- gh-comment-id:2726701893 --> @taylorwilsdon commented on GitHub (Mar 15, 2025): > [@computerdane](https://github.com/computerdane) Hit the same issue, same fix. Would be good to add a hint to the documentation of `WEBUI_SECRET_KEY`. There are no published docs on Open-WebUI's site about this currently, but I have a PR that adds them ready to go here https://github.com/open-webui/docs/pull/448
Author
Owner

@computerdane commented on GitHub (Mar 15, 2025):

@taylorwilsdon lol looks like we found each other at the same time

<!-- gh-comment-id:2726705529 --> @computerdane commented on GitHub (Mar 15, 2025): @taylorwilsdon lol looks like we found each other at the same time
Author
Owner

@taylorwilsdon commented on GitHub (Mar 15, 2025):

@taylorwilsdon lol looks like we found each other at the same time

just two souls passing in the night

<!-- gh-comment-id:2726706782 --> @taylorwilsdon commented on GitHub (Mar 15, 2025): > [@taylorwilsdon](https://github.com/taylorwilsdon) lol looks like we found each other at the same time just two souls passing in the night
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16292