From 4a3705e6754bda70bfd5b0a92c950f686152c052 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 2 Feb 2018 12:03:05 -0500 Subject: [PATCH] remove unnecessary fields from 2fa providers --- src/services/auth.service.ts | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/services/auth.service.ts b/src/services/auth.service.ts index c12904b1b5..70e9cae68a 100644 --- a/src/services/auth.service.ts +++ b/src/services/auth.service.ts @@ -22,43 +22,33 @@ import { UserService } from '../abstractions/user.service'; export const TwoFactorProviders = { [TwoFactorProviderType.Authenticator]: { + type: TwoFactorProviderType.Authenticator, name: null as string, description: null as string, - active: true, - free: true, - displayOrder: 0, priority: 1, }, [TwoFactorProviderType.Yubikey]: { + type: TwoFactorProviderType.Yubikey, name: null as string, description: null as string, - active: true, - free: false, - displayOrder: 1, priority: 3, }, [TwoFactorProviderType.Duo]: { + type: TwoFactorProviderType.Duo, name: 'Duo', description: null as string, - active: true, - free: false, - displayOrder: 2, priority: 2, }, [TwoFactorProviderType.U2f]: { + type: TwoFactorProviderType.U2f, name: null as string, description: null as string, - active: true, - free: false, - displayOrder: 3, priority: 4, }, [TwoFactorProviderType.Email]: { + type: TwoFactorProviderType.Email, name: null as string, description: null as string, - active: true, - free: false, - displayOrder: 4, priority: 0, }, }; @@ -119,7 +109,7 @@ export class AuthService { let providerPriority = -1; this.twoFactorProviders.forEach((value, type) => { const provider = (TwoFactorProviders as any)[type]; - if (provider != null && provider.active && provider.priority > providerPriority) { + if (provider != null && provider.priority > providerPriority) { if (type === TwoFactorProviderType.U2f && !u2fSupported) { return; }