mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #23671] [CLOSED] fix: send admin-entered client_id (not tool server id) during oauth_2.1_static registration #27308
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/23671
Author: @dhruvalgupta2003
Created: 4/13/2026
Status: ❌ Closed
Base:
dev← Head:fix/oauth-2.1-static-wiring📝 Commits (1)
0c11370fix: wire oauth_2.1_static through MCP auth code paths📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/lib/components/AddToolServerModal.svelte(+1 -1)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.dev.fix:Changelog Entry
Description
When registering an MCP tool server with
auth_type: oauth_2.1_static, the frontend incorrectly POSTs the tool server's internal id asclient_idinstead of the admin-entered OAuth Client ID (oauthClientId). Theclient_secretis sent correctly; only theclient_idis wrong. As a result, registration against the IdP is attempted with an invalid client and fails (or succeeds with an unusable record), even though the admin entered valid credentials.The correct value is already held in component state — it is used elsewhere in the same file when building the
infoobject for the save payload (seeinfo.oauth_client_id: oauthClientId). The registration POST is the only call site still binding to the wrong variable.Net diff: 1 line in 1 file.
Fixed
AddToolServerModal.sveltesending the tool server's internal id asclient_idduring theoauth_2.1_staticregistration POST. It now sends the admin-entered OAuth Client ID, matching what the backend (configs.pyOAuthClientRegistrationForm) expects and what the rest of the frontend already stores ininfo.oauth_client_id. Closes #23670.Related (already fixed in
dev, pointing out for future reference)Two other
oauth_2.1_staticwiring gaps were filed as issues — both turned out to already be fixed ondev, so they are not addressed by this PR:Authorizationheader for static MCP — already fixed ondev(backend/open_webui/utils/middleware.py:2520).authenticatedflag in tool listing — already fixed ondev(backend/open_webui/routers/tools.py:123,151).The issues can be closed once this PR lands.
Additional Information
Repro (before fix):
MCP, set an ID (e.g.calendar), URL, auth typeOAuth 2.1 (Static).POST /configs/oauth/clients/registerwithclient_id = "calendar"instead of the Entra app client id. Registration against the IdP fails.Expected (after fix): the POST carries the admin-entered OAuth Client ID, registration succeeds.
Screenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.