mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-21 14:19:31 +01:00
feat: oauth2.1 mcp integration
This commit is contained in:
@@ -57,16 +57,26 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const res = await registerOAuthClient(localStorage.token, {
|
||||
url: url,
|
||||
client_id: id
|
||||
}).catch((err) => {
|
||||
const res = await registerOAuthClient(
|
||||
localStorage.token,
|
||||
{
|
||||
url: url,
|
||||
client_id: id
|
||||
},
|
||||
'mcp'
|
||||
).catch((err) => {
|
||||
toast.error($i18n.t('Registration failed'));
|
||||
return null;
|
||||
});
|
||||
|
||||
if (res) {
|
||||
toast.warning(
|
||||
$i18n.t(
|
||||
'Please save the connection to persist the OAuth client information and do not change the ID'
|
||||
)
|
||||
);
|
||||
toast.success($i18n.t('Registration successful'));
|
||||
|
||||
console.debug('Registration successful', res);
|
||||
oauthClientInfo = res?.oauth_client_info ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user