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

yubikey 2fa config

This commit is contained in:
Kyle Spearrin
2018-06-27 13:45:11 -04:00
parent 246d605e5c
commit 4b4bedaef3
7 changed files with 278 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ import { TwoFactorProviderType } from 'jslib/enums/twoFactorProviderType';
import { ModalComponent } from '../modal.component';
import { TwoFactorAuthenticatorComponent } from './two-factor-authenticator.component';
import { TwoFactorYubiKeyComponent } from './two-factor-yubikey.component';
@Component({
selector: 'app-two-factor-setup',
@@ -81,11 +82,17 @@ export class TwoFactorSetupComponent implements OnInit {
manage(type: TwoFactorProviderType) {
switch (type) {
case TwoFactorProviderType.Authenticator:
const component = this.openModal(this.authenticatorModalRef, TwoFactorAuthenticatorComponent);
component.onUpdated.subscribe((enabled: boolean) => {
const authComp = this.openModal(this.authenticatorModalRef, TwoFactorAuthenticatorComponent);
authComp.onUpdated.subscribe((enabled: boolean) => {
this.updateStatus(enabled, TwoFactorProviderType.Authenticator)
});
break;
case TwoFactorProviderType.Yubikey:
const yubiComp = this.openModal(this.yubikeyModalRef, TwoFactorYubiKeyComponent);
yubiComp.onUpdated.subscribe((enabled: boolean) => {
this.updateStatus(enabled, TwoFactorProviderType.Yubikey)
});
break;
default:
break;
}