moved the update temp password check on login to right after syncing finishes
This commit is contained in:
parent
2c954d2ce0
commit
8e56790265
|
@ -26,17 +26,14 @@ export class LoginComponent extends BaseLoginComponent {
|
||||||
protected cryptoFunctionService: CryptoFunctionService, storageService: StorageService,
|
protected cryptoFunctionService: CryptoFunctionService, storageService: StorageService,
|
||||||
syncService: SyncService, private userService: UserService) {
|
syncService: SyncService, private userService: UserService) {
|
||||||
super(authService, router, platformUtilsService, i18nService, stateService, environmentService, passwordGenerationService, cryptoFunctionService, storageService);
|
super(authService, router, platformUtilsService, i18nService, stateService, environmentService, passwordGenerationService, cryptoFunctionService, storageService);
|
||||||
super.onSuccessfulLogin = () => {
|
super.onSuccessfulLogin = async () => {
|
||||||
return syncService.fullSync(true);
|
await syncService.fullSync(true).then(async () => {
|
||||||
|
if (await this.userService.getForcePasswordReset()) {
|
||||||
|
this.router.navigate(['update-temp-password']);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
super.successRoute = '/tabs/vault';
|
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() {
|
settings() {
|
||||||
|
|
Loading…
Reference in New Issue