1
我有一條登錄路線,將用戶重定向到外部Open ID Connect登錄頁面。一旦到達那裏,如果用戶點擊後退按鈕,他們會按照重定向他們的相同路線重新定向。有沒有辦法取消Aurelia的導航或阻止當前路線在歷史中被記住?Aurelia取消導航策略導航
config.mapRoute({
name: "login",
nav: false,
// If I exclude the module id, I get the desired behavior but errors are thrown from Aurelia.
moduleId: "components/login/login",
route: "login",
navigationStrategy: (instruction: NavigationInstruction) => {
// This promise constructs the redirect url then sets the window.location.href.
// Unfortunately, Aurelia seems to be finishing its business before the page is redirected because this login route is recorded in history.
return this.userManager.signinRedirect();
}
});