also moved the rmp check in the two factor component
This commit is contained in:
parent
a54c4c8efa
commit
c9a244471e
|
@ -49,22 +49,15 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||||
private userService: UserService) {
|
private userService: UserService) {
|
||||||
super(authService, router, i18nService, apiService, platformUtilsService, window, environmentService,
|
super(authService, router, i18nService, apiService, platformUtilsService, window, environmentService,
|
||||||
stateService, storageService, route);
|
stateService, storageService, route);
|
||||||
super.onSuccessfulLogin = () => {
|
super.onSuccessfulLogin = async () => {
|
||||||
return syncService.fullSync(true);
|
return syncService.fullSync(true).then(async () => {
|
||||||
|
if (await this.userService.getForcePasswordReset()) {
|
||||||
|
this.router.navigate(['update-temp-password']);
|
||||||
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
super.successRoute = '/tabs/vault';
|
super.successRoute = '/tabs/vault';
|
||||||
this.webAuthnNewTab = this.platformUtilsService.isFirefox() || this.platformUtilsService.isSafari();
|
this.webAuthnNewTab = this.platformUtilsService.isFirefox() || this.platformUtilsService.isSafari();
|
||||||
super.onSuccessfulLoginNavigate = async () => {
|
|
||||||
if (await this.userService.getForcePasswordReset()) {
|
|
||||||
this.router.navigate(['update-temp-password']);
|
|
||||||
} else {
|
|
||||||
this.router.navigate([this.successRoute], {
|
|
||||||
queryParams: {
|
|
||||||
identifier: this.identifier,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
|
Loading…
Reference in New Issue