issue: OAuth keeps redirecting to localhost:3000 #5371

Closed
opened 2025-11-11 16:18:58 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @McNickSistoPro on GitHub (May 28, 2025).

Check Existing Issues

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

Installation Method

Git Clone

Open WebUI Version

0.6.11

Ollama Version (if applicable)

No response

Operating System

MacOS

Browser (if applicable)

Chrome

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

With Microsoft OAuth, redirecting to correct / original host.

Actual Behavior

Since 0.6.11, Microsoft OAuth Authentification is not working.

The OAuth flow technically works, but the final redirect is going to the wrong URL. After successful authentication, instead of redirecting to:
https://URL/auth#token=

it redirects to
http://localhost:3000/auth#token=...

Steps to Reproduce

Hard to reproduce without Microsoft OAuth config.

Logs & Screenshots

Additional Information

And yes my .env file has:
WEBUI_URL=https://URL (with correct URL)

Originally created by @McNickSistoPro on GitHub (May 28, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version 0.6.11 ### Ollama Version (if applicable) _No response_ ### Operating System MacOS ### Browser (if applicable) Chrome ### 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 With Microsoft OAuth, redirecting to correct / original host. ### Actual Behavior Since 0.6.11, Microsoft OAuth Authentification is not working. The OAuth flow technically works, but the final redirect is going to the wrong URL. After successful authentication, instead of redirecting to: https://URL/auth#token= it redirects to http://localhost:3000/auth#token=... ### Steps to Reproduce Hard to reproduce without Microsoft OAuth config. ### Logs & Screenshots - GET /oauth/microsoft/login HTTP/1.1 302 - POST https://login.microsoftonline.com/.../oauth2/v2.0/token "HTTP/1.1 200 OK" - GET /oauth/microsoft/callback?code=... 307 ### Additional Information And yes my .env file has: WEBUI_URL=https://URL (with correct URL)
GiteaMirror added the bug label 2025-11-11 16:18:58 -06:00
Author
Owner

@nahata5 commented on GitHub (May 28, 2025):

I had this too - tried changing Nginx Proxy Manger headers and confirmed the redirect to Google auth window. I reverted back to 0.6.10 in my docker compose instead of leaving the main tag and login works again

@nahata5 commented on GitHub (May 28, 2025): I had this too - tried changing Nginx Proxy Manger headers and confirmed the redirect to Google auth window. I reverted back to 0.6.10 in my docker compose instead of leaving the main tag and login works again
Author
Owner

@McNickSistoPro commented on GitHub (May 28, 2025):

I had this too - tried changing Nginx Proxy Manger headers and confirmed the redirect to Google auth window. I reverted back to 0.6.10 in my docker compose instead of leaving the main tag and login works again

I did those same steps too:

  • including changing /playing with the advanced settings in NPM
  • double checking URI in Microsoft App Registrations
@McNickSistoPro commented on GitHub (May 28, 2025): > I had this too - tried changing Nginx Proxy Manger headers and confirmed the redirect to Google auth window. I reverted back to 0.6.10 in my docker compose instead of leaving the main tag and login works again I did those same steps too: - including changing /playing with the advanced settings in NPM - double checking URI in Microsoft App Registrations
Author
Owner

@hugobritobh commented on GitHub (May 28, 2025):

I also had the same problem in version 0.6.11.
I reverted the version to 0.6.10 and it worked

@hugobritobh commented on GitHub (May 28, 2025): I also had the same problem in version 0.6.11. I reverted the version to 0.6.10 and it worked
Author
Owner

@truongphung12947 commented on GitHub (May 28, 2025):

I had the same issue with v0.6.11. Rolled back to 0.6.10 works fine.

@truongphung12947 commented on GitHub (May 28, 2025): I had the same issue with v0.6.11. Rolled back to 0.6.10 works fine.
Author
Owner

@tjbck commented on GitHub (May 28, 2025):

PLEASE READ THE CHANGELOGS BEFORE UPDATING.

Also please check for previous issues/disucssions, WEBUI_URL is NOT an env var and must be configured from the UI.

@tjbck commented on GitHub (May 28, 2025): PLEASE READ THE CHANGELOGS BEFORE UPDATING. Also please check for previous issues/disucssions, `WEBUI_URL` is NOT an env var and must be configured from the UI.
Author
Owner

@McNickSistoPro commented on GitHub (May 28, 2025):

PLEASE READ THE CHANGELOGS BEFORE UPDATING.

Also please check for previous issues/disucssions, WEBUI_URL is NOT an env var and must be configured from the UI.

@tjbck sorry only looked at open issues not closed ones. Thank you.

Answer is here:
https://github.com/open-webui/open-webui/issues/14380#issuecomment-2911942311

@McNickSistoPro commented on GitHub (May 28, 2025): > PLEASE READ THE CHANGELOGS BEFORE UPDATING. > > Also please check for previous issues/disucssions, `WEBUI_URL` is NOT an env var and must be configured from the UI. @tjbck sorry only looked at open issues not closed ones. Thank you. **Answer is here:** https://github.com/open-webui/open-webui/issues/14380#issuecomment-2911942311
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5371