Skip to content

Commit

Permalink
fix: change password redirects to login page on success
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Haehnlein committed Mar 2, 2020
1 parent 7314bf0 commit 2bfdab6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/core/guards/login.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export class LoginGuard implements CanActivate {
return true;
}

// force page view by queryParam
if (route.queryParams.forcePageView) {
return true;
}

const returnUrl = route.queryParams.returnUrl || '/home';

this.currentDialog = this.modalService.open(LazyLoginModalComponent, { centered: true, size: 'sm' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class UpdatePasswordComponent implements OnInit, OnDestroy {
takeUntil(this.destroy$)
)
.subscribe(() => {
this.router.navigate(['/login']);
this.router.navigate(['/login'], { queryParams: { forcePageView: true } });
});
}

Expand Down

0 comments on commit 2bfdab6

Please sign in to comment.