From 134b07f439abc5f44284e81e6b586ff501059aaa Mon Sep 17 00:00:00 2001 From: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com> Date: Wed, 24 May 2023 16:05:48 -0400 Subject: [PATCH] PM-2373 - Fix hang for desktop and browser by removing await from onSuccessfulLogin() call as it was waiting for a full sync to finish before navigating to the vault which let the user see that the loginTwoFactor method had completed and the loading state of the component was "finished" even though it wasn't. Confirmed that the fix from PM-687 still works to allow an emergency contact to sign in via SSO after removing the await. (#5508) --- libs/angular/src/auth/components/two-factor.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/angular/src/auth/components/two-factor.component.ts b/libs/angular/src/auth/components/two-factor.component.ts index c7bf5075cd..11b7c9bbac 100644 --- a/libs/angular/src/auth/components/two-factor.component.ts +++ b/libs/angular/src/auth/components/two-factor.component.ts @@ -202,7 +202,9 @@ export class TwoFactorComponent extends CaptchaProtectedComponent implements OnI } if (this.onSuccessfulLogin != null) { this.loginService.clearValues(); - await this.onSuccessfulLogin(); + // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete + // before nagivating to the success route. + this.onSuccessfulLogin(); } if (response.resetMasterPassword) { this.successRoute = "set-password";