mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[PR #18415] [MERGED] enh: More detailed OAuth2.1 tool callback error handling + fix for editing existing tools #40414
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/18415
Author: @taylorwilsdon
Created: 10/18/2025
Status: ✅ Merged
Merged: 10/27/2025
Merged by: @tjbck
Base:
dev← Head:oauth_error_handling_enh📝 Commits (5)
40c450eAdd more granular information to oauth failure messagesc107a37Added a targeted utility to wipe all OAuth sessions for a provider so the cleanup can remove stale access tokens across every user when a connection is updatedd49fb9ccomplete cleanup of oauth clientsecbf74dAdded a preflight authorize check that automatically re-registers MCP OAuth clients when the stored client ID no longer exists on the server, so the browser flow never hits the stale-ID failure4b74034black fmt📊 Changes
3 files changed (+327 additions, -7 deletions)
View changed files
📝
backend/open_webui/models/oauth_sessions.py(+11 -0)📝
backend/open_webui/routers/configs.py(+50 -1)📝
backend/open_webui/utils/oauth.py(+266 -6)📄 Description
Pull Request Checklist
Closes https://github.com/open-webui/open-webui/discussions/18309
@tjbck I have tested this one extensively and it solves several of my real world issues. Will continue to build on the degree of specificity in the error messages but I'd call this safe to merge as-is.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
unauthorized_clientfailures.Added
_build_oauth_callback_error_messageto translate backend exceptions into actionable callback detail strings.Changed
Deprecated
Removed
Fixed
unauthorized_clienterrors after editing streamable-http MCP endpoints.Security
Breaking Changes
Additional Information
Screenshots or Videos
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.