mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #23701] [CLOSED] fix: Correct the OAuth2.1 static flow #27322
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/23701
Author: @DonMul
Created: 4/14/2026
Status: ❌ Closed
Base:
dev← Head:fixStaticOauthMCP📝 Commits (10+)
fe6783cMerge pull request #19030 from open-webui/devfc05e0aMerge pull request #19405 from open-webui/deve3faec6Merge pull request #19416 from open-webui/dev9899293Merge pull request #19448 from open-webui/dev140605eMerge pull request #19462 from open-webui/dev6f1486fMerge pull request #19466 from open-webui/devd95f533Merge pull request #19729 from open-webui/deva7271530.6.43 (#20093)6adde20Merge pull request #20394 from open-webui/devf9b0534Merge pull request #20522 from open-webui/dev📊 Changes
4 files changed (+85 additions, -46 deletions)
View changed files
📝
backend/open_webui/routers/configs.py(+14 -5)📝
backend/open_webui/utils/oauth.py(+57 -30)📝
src/lib/apis/configs/index.ts(+1 -0)📝
src/lib/components/AddToolServerModal.svelte(+13 -11)📄 Description
Changelog Entry
Description
The OAuth2.1 Static workflow was not working as intended. Somewhere in the conversion of the Static OAuth2.1 authentication for MCP servers Pull Request there was some lost in translation issues i believe (because the original Pull Request has some different functionality than what has been merged. This Pull Request is intended to correct the issues.
Fixed
Additional Information
The intended flow for Static OAuth2.1 credentials is as following:
The user gets the static
client_idandclient_secretfrom the provider of the MCP serverThe user will enter these in the current modal box to manage the MCP server (see below)

The user can (optionally) verify the connection, but Must (not optional) register the client. This client will ALWAYS make use of the entered client_id and client_secret
Whenever the user selects/enables the tool server in his/her chat, the user will be redirected to the authentication page of the MCP provider

The MCP provider will do a callback to the oauth client callback URL. For the example in the screenshots above, that would be
http://localhost:3000/oauth/clients/mcp:udemy/callback. It is possible that this callback URL needs to be configured on the side of the MCP provider as well.The MCP server will then be enabled for the user and can be queried accordingly

Please let me know if there are any unclarities about this feature, i am more than willing to help!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.