refac
This commit is contained in:
1 parent
c584a4270c
commit
ae5d23f226
4 files changed
+44
-16
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user