2017-02-27 4 views
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(); 

      } 
     }); 

답변

0

나는 알고있다 그 당신은 아마 다른 곳에서 해답을 발견,하지만 당신은

router.navigate('new url', { replace: true }); 
을 시도 할 수 있도록 오랜만