From c89b01c4616eb104156ab5ef427051c297417bdd Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 3 Apr 2018 15:11:37 -0400 Subject: [PATCH] added 2fa support for org duo --- jslib | 2 +- src/app/accounts/two-factor-options.component.ts | 4 ++++ src/app/accounts/two-factor.component.html | 6 ++++-- src/app/accounts/two-factor.component.ts | 1 + src/images/two-factor/6.png | Bin 0 -> 1211 bytes src/locales/en/messages.json | 8 ++++++++ 6 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 src/images/two-factor/6.png diff --git a/jslib b/jslib index bdbb0131..bea9e065 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit bdbb01317d6b41a9c0f74d47bf89e8ed11631fdc +Subproject commit bea9e06506424ba07764f68eaaaa9161a12da767 diff --git a/src/app/accounts/two-factor-options.component.ts b/src/app/accounts/two-factor-options.component.ts index 49c6b14f..4bf54158 100644 --- a/src/app/accounts/two-factor-options.component.ts +++ b/src/app/accounts/two-factor-options.component.ts @@ -35,6 +35,10 @@ export class TwoFactorOptionsComponent implements OnInit { private platformUtilsService: PlatformUtilsService) { } ngOnInit() { + if (this.authService.twoFactorProviders.has(TwoFactorProviderType.OrganizationDuo)) { + this.providers.push(TwoFactorProviders[TwoFactorProviderType.OrganizationDuo]); + } + if (this.authService.twoFactorProviders.has(TwoFactorProviderType.Authenticator)) { this.providers.push(TwoFactorProviders[TwoFactorProviderType.Authenticator]); } diff --git a/src/app/accounts/two-factor.component.html b/src/app/accounts/two-factor.component.html index ed95f9e3..8bfe9fbf 100644 --- a/src/app/accounts/two-factor.component.html +++ b/src/app/accounts/two-factor.component.html @@ -34,7 +34,8 @@ - +
@@ -55,7 +56,8 @@
diff --git a/src/app/accounts/two-factor.component.ts b/src/app/accounts/two-factor.component.ts index c58a208f..139bb9fa 100644 --- a/src/app/accounts/two-factor.component.ts +++ b/src/app/accounts/two-factor.component.ts @@ -85,6 +85,7 @@ export class TwoFactorComponent implements OnInit { // TODO: init u2f break; case TwoFactorProviderType.Duo: + case TwoFactorProviderType.OrganizationDuo: setTimeout(() => { (window as any).Duo.init({ host: params.Host, diff --git a/src/images/two-factor/6.png b/src/images/two-factor/6.png new file mode 100644 index 0000000000000000000000000000000000000000..ab2e43403614fdae987a9f34b5c7c80f7a0599cd GIT binary patch literal 1211 zcmV;s1VsCZP)%tn11b)cMr&h>9Z! zqKKearD~K`BZ~9TI#Wu;p;hXDB*uIFf9`+q5R%;C+O!F7NG5NB{Cmb2|{b3iEUsr5Tm;$;&uhR z2fc2G2CIo6P80k_e=OA>3pwGwef0zL1Gpuq6#TzyWbho?>mx__+N( z+VEYxp&$@NXd@pcF;v_=8 zKa-nV#d;|v2BXw_XnM&1;JHhkxLJD0E8oirdtT$Ver>VbGhr|y_yTy;`LDdA+J&=s z)R^%g=_&Xde5~*lcEq@08M`?OZ^$!fCyhf^k-pw^Hd{Ir~yZyf3{RxgoK#*hd+?FBUvs44}p_L$Da;4jAH6=O+nm{UqwO>AjDnK6?Ue_p+&`vL5c;ymrC<9f6;HrR?aO zMs~hKO||F>#(_~T^=|;3mASpu{c{zhHpA;rie3_h^p*#B=Snpil-CuO&bl;J@1DIE ZU;w~$