Update success route before navigate action (#208)

This commit is contained in:
Vincent Salucci 2020-11-22 08:46:56 -06:00 committed by GitHub
parent 9e4d000b4d
commit d9d13bbf0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -197,12 +197,12 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
this.onSuccessfulLogin(); this.onSuccessfulLogin();
} }
this.platformUtilsService.eventTrack('Logged In From Two-step'); this.platformUtilsService.eventTrack('Logged In From Two-step');
if (this.onSuccessfulLoginNavigate != null) {
this.onSuccessfulLoginNavigate();
} else {
if (response.resetMasterPassword) { if (response.resetMasterPassword) {
this.successRoute = 'set-password'; this.successRoute = 'set-password';
} }
if (this.onSuccessfulLoginNavigate != null) {
this.onSuccessfulLoginNavigate();
} else {
this.router.navigate([this.successRoute], { this.router.navigate([this.successRoute], {
queryParams: { queryParams: {
identifier: this.identifier, identifier: this.identifier,