mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #21634] [CLOSED] feat: add SSO custom logout URI support #49220
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/21634
Author: @hztBUAA
Created: 2/20/2026
Status: ❌ Closed
Base:
main← Head:feat/sso-custom-logout-uri📝 Commits (1)
9ae0e91feat: add OAUTH_LOGOUT_URI for custom SSO logout redirection📊 Changes
2 files changed (+21 additions, -1 deletions)
View changed files
📝
backend/open_webui/config.py(+7 -1)📝
backend/open_webui/routers/auths.py(+14 -0)📄 Description
Summary
Fixes #19182
OAUTH_LOGOUT_URIenvironment variable (PersistentConfig) to allow configuring a custom logout URL for SSO providersOAUTH_LOGOUT_URIis set and an OAuth session exists, the signout handler redirects to it directly, bypassing the standard OIDCend_session_endpointdiscovery flowOAUTH_LOGOUT_URIis configured (since logout will work withoutOPENID_PROVIDER_URLin that case)Motivation
SSO providers like AWS Cognito do not support the standard OIDC logout flow (
end_session_endpointwithid_token_hint/post_logout_redirect_uri). They require provider-specific logout URLs with different parameters. This change allows administrators to set the full logout URI upfront, which is sufficient when all values are known at configuration time.Example usage (AWS Cognito)
Changes
backend/open_webui/config.py: AddedOAUTH_LOGOUT_URIPersistentConfig; updated startup warning logicbackend/open_webui/routers/auths.py: ImportedOAUTH_LOGOUT_URI; added early return in signout handler when custom URI is configuredTest plan
OAUTH_LOGOUT_URIto a custom URL and verify signout redirects to itOAUTH_LOGOUT_URIunset and verify existing OIDC logout flow still worksOAUTH_LOGOUT_URIwithoutOPENID_PROVIDER_URLand verify no startup warning🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.