1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-09 09:51:02 +01:00

timeout when trying u2f again

This commit is contained in:
Kyle Spearrin 2017-07-24 11:52:31 -04:00
parent a7beed334f
commit 55a50fac83
2 changed files with 10 additions and 2 deletions

View File

@ -254,7 +254,10 @@ angular
if (data.errorCode) { if (data.errorCode) {
console.log(data.errorCode); console.log(data.errorCode);
$timeout(function () {
initU2f(challenges); initU2f(challenges);
}, data.errorCode === 5 ? 0 : 1000);
return; return;
} }

View File

@ -73,9 +73,14 @@ function initU2f(obj) {
if (data.errorCode) { if (data.errorCode) {
if (data.errorCode !== 5) { if (data.errorCode !== 5) {
error('U2F Error: ' + data.errorCode); error('U2F Error: ' + data.errorCode);
setTimeout(function () {
initU2f(obj);
}, 1000)
}
else {
initU2f(obj);
} }
initU2f(obj);
return; return;
} }