moved the update temp password check on login to right after syncing finishes

This commit is contained in:
addison 2021-08-11 12:19:08 -04:00
parent f09b7982d1
commit f0e5bbd253
1 changed files with 6 additions and 9 deletions

View File

@ -26,17 +26,14 @@ export class LoginComponent extends BaseLoginComponent {
protected cryptoFunctionService: CryptoFunctionService, storageService: StorageService,
syncService: SyncService, private userService: UserService) {
super(authService, router, platformUtilsService, i18nService, stateService, environmentService, passwordGenerationService, cryptoFunctionService, storageService);
super.onSuccessfulLogin = () => {
return syncService.fullSync(true);
super.onSuccessfulLogin = async () => {
await syncService.fullSync(true).then(async () => {
if (await this.userService.getForcePasswordReset()) {
this.router.navigate(['update-temp-password']);
}
});
};
super.successRoute = '/tabs/vault';
super.onSuccessfulLoginNavigate = async () => {
if (await this.userService.getForcePasswordReset()) {
this.router.navigate(['update-temp-password']);
} else {
this.router.navigate([this.successRoute]);
}
};
}
settings() {