diff --git a/src/app/accounts/accountsLoginController.js b/src/app/accounts/accountsLoginController.js index 747d6f7e47..f284c11271 100644 --- a/src/app/accounts/accountsLoginController.js +++ b/src/app/accounts/accountsLoginController.js @@ -254,7 +254,10 @@ angular if (data.errorCode) { console.log(data.errorCode); - initU2f(challenges); + + $timeout(function () { + initU2f(challenges); + }, data.errorCode === 5 ? 0 : 1000); return; } diff --git a/src/js/u2f-connector.js b/src/js/u2f-connector.js index 78d105942a..c09b33fdf8 100644 --- a/src/js/u2f-connector.js +++ b/src/js/u2f-connector.js @@ -73,9 +73,14 @@ function initU2f(obj) { if (data.errorCode) { if (data.errorCode !== 5) { error('U2F Error: ' + data.errorCode); + setTimeout(function () { + initU2f(obj); + }, 1000) + } + else { + initU2f(obj); } - initU2f(obj); return; }