This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-29 12:38:04 -05:00
1 parent c584a4270c
commit ae5d23f226
4 files changed
+44 -16

No files matched your search

+11
View File
@@ -509,6 +509,17 @@ export const getOAuthClientAuthorizationUrl = (clientId: string, type: null | st
return `${WEBUI_BASE_URL}/oauth/clients/${oauthClientId}/authorize`;
};
export const initiateOAuthRedirect = (tool: {
id: string;
serverId: string;
authType?: string | null;
}) => {
sessionStorage.setItem('pendingOAuthToolId', tool.id);
sessionStorage.setItem('oauthRedirectInProgressToolId', tool.id);
const authUrl = getOAuthClientAuthorizationUrl(tool.serverId, tool.authType ?? 'mcp');
window.open(authUrl, '_self', 'noopener');
};
export const getCodeExecutionConfig = async (token: string) => {
let error = null;