URL parameters are not preserved after login redirect #4036

Closed
opened 2025-11-11 15:44:53 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @nonprofittechy on GitHub (Feb 21, 2025).

Bug Report

Important Notes

Installation Method

Docker install.

services:
traefik:
image: traefik:v2.10
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"

openwebui:
image: ghcr.io/open-webui/open-webui:main
labels:
- "traefik.enable=true"
- "traefik.http.routers.openwebui.rule=Host(MYDOMAIN.COM)"
- "traefik.http.routers.openwebui.entrypoints=web"
- "traefik.http.services.openwebui.loadbalancer.server.port=8080"
volumes:
- "open-webui:/app/backend/data"
restart: always
depends_on:
- traefik
- pipelines
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 30s
timeout: 10s
retries: 3

pipelines:
image: ghcr.io/open-webui/pipelines:main
container_name: pipelines
ports:
- "9099:9099"
volumes:
- "pipelines-data:/app/pipelines"
restart: always

autoheal:
image: willfarrell/autoheal
container_name: autoheal
restart: always
environment:
- AUTOHEAL_CONTAINER_LABEL=all
volumes:
- /var/run/docker.sock:/var/run/docker.sock

volumes:
open-webui:
pipelines-data:

Environment

  • Open WebUI Version: v0.5.15

  • Operating System: Ubuntu 24.04

  • Browser (if applicable): Chrome latest

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • [N/A] I have included the browser console logs.
  • [N/A] I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

When I visit a URL like https://ai.example.org/?models=clinic-helper, I am [eventually] taken directly to the model, regardless
of whether I am logged in or not.

Actual Behavior:

If I am logged in, the link takes me to the model.

If I am not logged in, the link takes me to a login screen, and then to the default model for the logged in user,
regardless of the starting URL I use.

Description

Bug Summary:

URL parameters are ignored if the user doesn't start out logged in.

Reproduction Details

  1. Craft a URL to a valid model on your server. E.g., /?model=gpt-4o
  2. Verify that you are redirected to the model when visiting the URL
  3. Open a new incognito window
  4. Visit the URL
  5. Login
  6. Confirm that you are in the default chat rather than the one specified in the URL, and that the URL parameters are no longer present in the location bar
Originally created by @nonprofittechy on GitHub (Feb 21, 2025). # Bug Report ## Important Notes ## Installation Method Docker install. services: traefik: image: traefik:v2.10 command: - "--log.level=DEBUG" - "--api.insecure=true" - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" ports: - "80:80" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" openwebui: image: ghcr.io/open-webui/open-webui:main labels: - "traefik.enable=true" - "traefik.http.routers.openwebui.rule=Host(`MYDOMAIN.COM`)" - "traefik.http.routers.openwebui.entrypoints=web" - "traefik.http.services.openwebui.loadbalancer.server.port=8080" volumes: - "open-webui:/app/backend/data" restart: always depends_on: - traefik - pipelines healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080"] interval: 30s timeout: 10s retries: 3 pipelines: image: ghcr.io/open-webui/pipelines:main container_name: pipelines ports: - "9099:9099" volumes: - "pipelines-data:/app/pipelines" restart: always autoheal: image: willfarrell/autoheal container_name: autoheal restart: always environment: - AUTOHEAL_CONTAINER_LABEL=all volumes: - /var/run/docker.sock:/var/run/docker.sock volumes: open-webui: pipelines-data: ## Environment - **Open WebUI Version:** v0.5.15 - **Operating System:** Ubuntu 24.04 - **Browser (if applicable):** Chrome latest **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I am on the latest version of both Open WebUI and Ollama. - [N/A] I have included the browser console logs. - [N/A] I have included the Docker container logs. - [X] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: When I visit a URL like https://ai.example.org/?models=clinic-helper, I am [eventually] taken directly to the model, regardless of whether I am logged in or not. ## Actual Behavior: If I am logged in, the link takes me to the model. If I am not logged in, the link takes me to a login screen, and then to the default model for the logged in user, regardless of the starting URL I use. ## Description **Bug Summary:** URL parameters are ignored if the user doesn't start out logged in. ## Reproduction Details 1. Craft a URL to a valid model on your server. E.g., /?model=gpt-4o 2. Verify that you are redirected to the model when visiting the URL 3. Open a new incognito window 4. Visit the URL 5. Login 6. Confirm that you are in the default chat rather than the one specified in the URL, and that the URL parameters are no longer present in the location bar
Author
Owner

@cwthomas-llu commented on GitHub (Mar 12, 2025):

We have the same problem, but we are using the Microsoft SSO authentication method.

@cwthomas-llu commented on GitHub (Mar 12, 2025): We have the same problem, but we are using the Microsoft SSO authentication method.
Author
Owner

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

Expected Behavior:
When I visit a URL like https://ai.example.org/?models=clinic-helper, I am taken directly to the model, regardless
of whether I am logged in or not.

Sorry for my ignorance, but why is this expected behavior?
Why should it take you to the model instead of the login page, if you are not logged in?

@Classic298 commented on GitHub (Mar 13, 2025): > Expected Behavior: > When I visit a URL like https://ai.example.org/?models=clinic-helper, I am taken directly to the model, regardless of whether I am logged in or not. Sorry for my ignorance, but why is this expected behavior? Why should it take you to the model instead of the login page, if you are **_not logged in?_**
Author
Owner

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

Expected Behavior:
When I visit a URL like https://ai.example.org/?models=clinic-helper, I am taken directly to the model, regardless
of whether I am logged in or not.

Sorry for my ignorance, but why is this expected behavior? Why should it take you to the model instead of the login page, if you are not logged in?

Hi, I've updated the description to be a bit clearer. The issue isn't that you can't visit the model when you're logged out. The login screen is totally expected. It's that the URL parameters disappear in between you clicking the link and logging in. Meaning you can't reliably bookmark a link to a specific model.

@nonprofittechy commented on GitHub (Mar 13, 2025): > > Expected Behavior: > > When I visit a URL like https://ai.example.org/?models=clinic-helper, I am taken directly to the model, regardless > > of whether I am logged in or not. > > Sorry for my ignorance, but why is this expected behavior? Why should it take you to the model instead of the login page, if you are **_not logged in?_** Hi, I've updated the description to be a bit clearer. The issue isn't that you can't visit the model when you're logged out. The login screen is totally expected. It's that the URL parameters disappear in between you clicking the link and logging in. Meaning you can't reliably bookmark a link to a specific model.
Author
Owner

@cwthomas-llu commented on GitHub (Mar 13, 2025):

Hi, I've updated the description to be a bit clearer. The issue isn't that you can't visit the model when you're logged out. The login screen is totally expected. It's that the URL parameters disappear in between you clicking the link and logging in. Meaning you can't reliably bookmark a link to a specific model.

Exactly. After a user is authenticated, the app should redirect back to the page that required authentication. This makes deep linking work both for logged in and not logged in users.

@cwthomas-llu commented on GitHub (Mar 13, 2025): > Hi, I've updated the description to be a bit clearer. The issue isn't that you can't visit the model when you're logged out. The login screen is totally expected. It's that the URL parameters disappear in between you clicking the link and logging in. Meaning you can't reliably bookmark a link to a specific model. Exactly. After a user is authenticated, the app should redirect back to the page that required authentication. This makes deep linking work both for logged in and not logged in users.
Author
Owner

@shirayu commented on GitHub (Mar 24, 2025):

Solved by #11950

@shirayu commented on GitHub (Mar 24, 2025): Solved by #11950
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4036