mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #15575] [CLOSED] Fix: Correct redirect after OAuth login #10672
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15575
Author: @knyl2013
Created: 7/7/2025
Status: ❌ Closed
Base:
dev← Head:sso-redirect-fix📝 Commits (2)
0d978deFix SSO redirect604aeb1Styling📊 Changes
2 files changed (+50 additions, -7 deletions)
View changed files
📝
backend/open_webui/utils/oauth.py(+27 -2)📝
src/routes/auth/+page.svelte(+23 -5)📄 Description
Changelog Entry
Description
Current behaviour: When a user is on a specific page (e.g., a chat or settings) and is prompted to log in, the redirect functionality works correctly for the standard email/password login. But when using an OAuth provider (like Google, GitHub, etc.), the user is always redirected to the root URL (homepage) after a successful login, instead of the last page they were on.
Fixed
This fix ensures the redirect works correctly for the OAuth flow by storing the redirect url inside the OAuth
stateparameter.Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.