我只是在做 msal.logout() ,它重定向到注销屏幕,然后要求登录,然后登录后导航到www.office.com,我怎样才能在注销后停止所有重定向。
这是配置
export const msalConfig: Configuration = {
auth: {
clientId: "xxxxxx",
authority: "https://login.microsoftonline.com/xxx",
redirectUri: `http://localhost:3000`,
postLogoutRedirectUri: `https://localhost:3000/logout`
}
};
import { IMsalContext, useMsal } from "@azure/msal-react";
const { instance } = useMsal();
export function handleLogout(instance: any) {
instance.logout(endSessionRequest); //This logouts and then ask for login and then go to www.office.com which is not configured anywhere in msalConfig
}
export const endSessionRequest: EndSessionRequest = {
postLogoutRedirectUri: `https://localhost:3000/logout`
};
注意:这是登录点击后的redirecturl,其中包含www.office.com