feat: oauth backchannel logout

This commit is contained in:
Timothy Jaeryang Baek
2026-04-02 08:46:34 -05:00
parent 4dea4fdf54
commit 0dd9f462ff
4 changed files with 226 additions and 3 deletions
+17
View File
@@ -511,6 +511,8 @@ from open_webui.env import (
WEBUI_ADMIN_NAME,
ENABLE_EASTER_EGGS,
LOG_FORMAT,
# OAuth Back-Channel Logout
ENABLE_OAUTH_BACKCHANNEL_LOGOUT,
)
@@ -2477,6 +2479,21 @@ async def oauth_login_callback(
return await oauth_manager.handle_callback(request, provider, response, db=db)
############################
# OIDC Back-Channel Logout
############################
@app.post('/oauth/backchannel-logout')
async def oauth_backchannel_logout(
request: Request,
db: Session = Depends(get_session),
):
if not ENABLE_OAUTH_BACKCHANNEL_LOGOUT:
raise HTTPException(status_code=404)
return await oauth_manager.handle_backchannel_logout(request, db=db)
@app.get('/manifest.json')
async def get_manifest_json():
if app.state.EXTERNAL_PWA_MANIFEST_URL: