From f0e5bbd253a2ace9168ba1275955a4d9cf7984f0 Mon Sep 17 00:00:00 2001 From: addison Date: Wed, 11 Aug 2021 12:19:08 -0400 Subject: [PATCH] moved the update temp password check on login to right after syncing finishes --- src/popup/accounts/login.component.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/popup/accounts/login.component.ts b/src/popup/accounts/login.component.ts index ffcf9c375a..ebace90a8c 100644 --- a/src/popup/accounts/login.component.ts +++ b/src/popup/accounts/login.component.ts @@ -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() {