issue: QueryParams (e.g. pre-selected model) gets lost after login via SSO (/auth/redirect endpoint) #6327

Closed
opened 2025-11-11 16:51:14 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @MaxStroh on GitHub (Sep 5, 2025).

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.6.26

Ollama Version (if applicable)

No response

Operating System

Kubernetes

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

  • In past versions of OpenWebUI the queryParams were passed through and survived the SSO Redirect-Flow
  • e.g. we are referencing an URL to OpenWebUI with a pre-selected model (e.g.: https://<OPENWEBUI_URL>/?model=custom-chat-bot )
  • The URL opens the OpenWebUI Login
  • After logging in via SSO, OpenWebUI opens with the model pre-selected that was passed through via the queryparam "model" in the URL

Actual Behavior

  • After logging in via SSO, OpenWebUI opens with the current default model selected, not the model passed through the queryparam "model" in the URL
  • If the user is already logged in, the behaviour is working perfectly fine
  • The model queryParam is passed through correctly until "/auth?redirect=%2F%3Fmodel%3Dcustom-chat-bot" - after that, the queryParams get erased and are lost and the user is redirected to "/auth" (without any queryParams)

Steps to Reproduce

  1. In OpenWebUI click the "select model"-dropdown in the upper left corner
  2. On any model (that is not the default model configured in OpenWebUIs admin settings) click the "3-dots-menu" > "copy link"
  3. Make sure you are not logged in anymore (e.g. incognito window / clean up cache + browser app data / logout of OpenWebUI)
  4. Open the copied link (<OPENWEBUI_URL/?model=any-model
  5. Login via SSO (in our case Microsoft) and have an eye on the changing URLs in your browser (because of redirects) and watch on the query params
  6. Walk through the SSO steps until you are redirected back to OpenWebUI
  7. Check the pre-selected model in the upper-left corner

Logs & Screenshots

No relevant logs existing (as query params are not logged eitherway)

Additional Information

  • Unfortunately, I do not know which version - but for integrating banners into other tools, which include URLs to OpenWebUI with a specific model pre-selected , we explicitly tested exactly this behaviour a few weeks ago, so I am 100% sure that this worked a few versions in the past
  • Since these tests, we did not change any of our OpenWebUI SSO configurations (we have set the needed env variables which are needed for Microsoft SSO to work) and did not change anything on the AppRegistration in Azure
Originally created by @MaxStroh on GitHub (Sep 5, 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 Docker ### Open WebUI Version v0.6.26 ### Ollama Version (if applicable) _No response_ ### Operating System Kubernetes ### 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 * In past versions of OpenWebUI the queryParams were passed through and survived the SSO Redirect-Flow * e.g. we are referencing an URL to OpenWebUI with a pre-selected model (e.g.: https://<OPENWEBUI_URL>/?model=custom-chat-bot ) * The URL opens the OpenWebUI Login * After logging in via SSO, OpenWebUI opens with the model pre-selected that was passed through via the queryparam "model" in the URL ### Actual Behavior * After logging in via SSO, OpenWebUI opens with the current default model selected, not the model passed through the queryparam "model" in the URL * If the user is already logged in, the behaviour is working perfectly fine * The model queryParam is passed through correctly until "/auth?redirect=%2F%3Fmodel%3Dcustom-chat-bot" - after that, the queryParams get erased and are lost and the user is redirected to "/auth" (without any queryParams) ### Steps to Reproduce 1. In OpenWebUI click the "select model"-dropdown in the upper left corner 2. On any model (that is not the default model configured in OpenWebUIs admin settings) click the "3-dots-menu" > "copy link" 3. Make sure you are not logged in anymore (e.g. incognito window / clean up cache + browser app data / logout of OpenWebUI) 4. Open the copied link (<OPENWEBUI_URL/?model=any-model 5. Login via SSO (in our case Microsoft) and have an eye on the changing URLs in your browser (because of redirects) and watch on the query params 6. Walk through the SSO steps until you are redirected back to OpenWebUI 7. Check the pre-selected model in the upper-left corner ### Logs & Screenshots No relevant logs existing (as query params are not logged eitherway) ### Additional Information * Unfortunately, I do not know which version - but for integrating banners into other tools, which include URLs to OpenWebUI with a specific model pre-selected , we explicitly tested exactly this behaviour a few weeks ago, so I am 100% sure that this worked a few versions in the past * Since these tests, we did not change any of our OpenWebUI SSO configurations (we have set the needed env variables which are needed for Microsoft SSO to work) and did not change anything on the AppRegistration in Azure
GiteaMirror added the bug label 2025-11-11 16:51:14 -06:00
Author
Owner

@tjbck commented on GitHub (Sep 6, 2025):

Addressed with 4f2b821088

@tjbck commented on GitHub (Sep 6, 2025): Addressed with 4f2b821088367da18374027919594365c7a3f459
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#6327