refac
This commit is contained in:
1 parent
2e6d61e6d0
commit
7198e9d0df
3 files changed
+11
-1
No files matched your search
@@ -572,9 +572,13 @@ export const initiateOAuthRedirect = (tool: {
|
||||
}) => {
|
||||
sessionStorage.setItem('pendingOAuthToolId', tool.id);
|
||||
sessionStorage.setItem('oauthRedirectInProgressToolId', tool.id);
|
||||
localStorage.setItem('pendingOAuthToolId', tool.id);
|
||||
localStorage.setItem('oauthRedirectInProgressToolId', tool.id);
|
||||
const authUrl = getOAuthClientAuthorizationUrl(tool.serverId, tool.authType ?? 'mcp');
|
||||
const tab = window.open(authUrl, '_blank');
|
||||
if (!tab) {
|
||||
localStorage.removeItem('pendingOAuthToolId');
|
||||
localStorage.removeItem('oauthRedirectInProgressToolId');
|
||||
window.open(authUrl, '_self', 'noopener');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user