【发布时间】:2020-01-08 16:17:20
【问题描述】:
我在我的电子应用程序中使用 microsoft adal 进行身份验证。在我的应用程序中没有使用 jQuery,但是当我尝试注销时,[我在我的应用程序控制台中收到此错误]
const redirectTo = `https://login.microsoftonline.com/${config.Adal.TenantID}/oauth2/v2.0/logout?post_logout_redirect_uri=${authContext.config.postLogoutRedirectUri}`;
const logout = () => {
authContext.logOut();
redirect(redirectTo, '/');
};
authContext 文件
export const adalConfig = {
clientId: config.Adal.ClientID,
tenant: config.Adal.TenantID,
cacheLocation: 'localStorage',
redirectUri: config.Adal.RedirectURI,
postLogoutRedirectUri: loginUrl
};
export const authContext = new AuthenticationContext(adalConfig);
应用卡在“请稍等,我们将您退出”。
【问题讨论】:
-
您找到解决方案了吗?在将 Microsoft 身份提供程序与 Electron 一起使用时,我遇到了完全相同的问题。该应用程序卡在“我们退出时请稍等。”
-
很遗憾没有,我不得不分叉 msal 库,然后对身份验证的工作方式进行一些更改。
标签: javascript node.js reactjs electron adal