From afcc5ceb5bf318d70998926400ef68ec658ffe61 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 26 Jun 2017 15:32:34 -0400 Subject: [PATCH] adjust priorities --- src/app/accounts/accountsLoginController.js | 1 + src/app/constants.js | 8 ++++---- src/js/u2f-connector.js | 2 -- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/accounts/accountsLoginController.js b/src/app/accounts/accountsLoginController.js index 5ad205f87c..bdf12635de 100644 --- a/src/app/accounts/accountsLoginController.js +++ b/src/app/accounts/accountsLoginController.js @@ -91,6 +91,7 @@ angular var provider = $filter('filter')(constants.twoFactorProviderInfo, { type: keys[i], active: true }); if (provider.length && provider[0].priority > providerPriority) { providerType = provider[0].type; + providerPriority = provider[0].priority; } } return parseInt(providerType); diff --git a/src/app/constants.js b/src/app/constants.js index b9d6a1d3c0..f1cdae3bb1 100644 --- a/src/app/constants.js +++ b/src/app/constants.js @@ -39,7 +39,7 @@ angular.module('bit') free: true, image: 'authapp.png', displayOrder: 0, - priority: 3 + priority: 1 }, { type: 3, @@ -49,7 +49,7 @@ angular.module('bit') active: true, image: 'yubico.png', displayOrder: 1, - priority: 1 + priority: 3 }, { type: 2, @@ -69,7 +69,7 @@ angular.module('bit') active: true, image: 'fido.png', displayOrder: 3, - priority: 0 + priority: 4 }, { type: 1, @@ -79,7 +79,7 @@ angular.module('bit') active: true, image: 'gmail.png', displayOrder: 4, - priority: 4 + priority: 0 } ], plans: { diff --git a/src/js/u2f-connector.js b/src/js/u2f-connector.js index a8da989b9e..4494c842cc 100644 --- a/src/js/u2f-connector.js +++ b/src/js/u2f-connector.js @@ -6,8 +6,6 @@ var parentUrl = null, version = null; function init() { - info('initing'); - if (!u2f.isSupported) { error('U2F is not supported in this browser.'); return;