1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-10 12:33:26 +00:00

PM-2058 Update Two Factor Recovery Dialog (#8985)

This commit is contained in:
KiruthigaManivannan
2024-05-23 20:47:11 +05:30
committed by GitHub
parent 8335d8f484
commit 02c524dd5f
4 changed files with 38 additions and 46 deletions

View File

@@ -33,8 +33,6 @@ import { TwoFactorYubiKeyComponent } from "./two-factor-yubikey.component";
templateUrl: "two-factor-setup.component.html",
})
export class TwoFactorSetupComponent implements OnInit, OnDestroy {
@ViewChild("recoveryTemplate", { read: ViewContainerRef, static: true })
recoveryModalRef: ViewContainerRef;
@ViewChild("authenticatorTemplate", { read: ViewContainerRef, static: true })
authenticatorModalRef: ViewContainerRef;
@ViewChild("yubikeyTemplate", { read: ViewContainerRef, static: true })
@@ -211,8 +209,8 @@ export class TwoFactorSetupComponent implements OnInit, OnDestroy {
async recoveryCode() {
const result = await this.callTwoFactorVerifyDialog(-1 as TwoFactorProviderType);
if (result) {
const recoverComp = await this.openModal(this.recoveryModalRef, TwoFactorRecoveryComponent);
recoverComp.auth(result);
const recoverComp = TwoFactorRecoveryComponent.open(this.dialogService, { data: result });
await lastValueFrom(recoverComp.closed);
}
}