From ad40db9ecf45213ea0fb6cd37c792a092dcf8d4d Mon Sep 17 00:00:00 2001 From: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:17:23 -0400 Subject: [PATCH] PM-13368 - Registration with Email Verification - Registration Finish - Add 2FA support (#11614) --- .../registration-finish/registration-finish.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/auth/src/angular/registration/registration-finish/registration-finish.component.ts b/libs/auth/src/angular/registration/registration-finish/registration-finish.component.ts index be9d8abe5b..3a6d26ef93 100644 --- a/libs/auth/src/angular/registration/registration-finish/registration-finish.component.ts +++ b/libs/auth/src/angular/registration/registration-finish/registration-finish.component.ts @@ -163,7 +163,12 @@ export class RegistrationFinishComponent implements OnInit, OnDestroy { null, ); - await this.loginStrategyService.logIn(credentials); + const authenticationResult = await this.loginStrategyService.logIn(credentials); + + if (authenticationResult?.requiresTwoFactor) { + await this.router.navigate(["/2fa"]); + return; + } this.toastService.showToast({ variant: "success",