1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

implement 2fa setup for u2f

This commit is contained in:
Kyle Spearrin
2018-06-27 17:50:31 -04:00
parent 890bf49294
commit bf5d8cab1c
11 changed files with 279 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ import { ModalComponent } from '../modal.component';
import { TwoFactorAuthenticatorComponent } from './two-factor-authenticator.component';
import { TwoFactorDuoComponent } from './two-factor-duo.component';
import { TwoFactorEmailComponent } from './two-factor-email.component';
import { TwoFactorU2fComponent } from './two-factor-u2f.component';
import { TwoFactorYubiKeyComponent } from './two-factor-yubikey.component';
@Component({
@@ -108,6 +109,12 @@ export class TwoFactorSetupComponent implements OnInit {
this.updateStatus(enabled, TwoFactorProviderType.Email);
});
break;
case TwoFactorProviderType.U2f:
const u2fComp = this.openModal(this.u2fModalRef, TwoFactorU2fComponent);
u2fComp.onUpdated.subscribe((enabled: boolean) => {
this.updateStatus(enabled, TwoFactorProviderType.U2f);
});
break;
default:
break;
}