1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

not supported scenario

This commit is contained in:
Kyle Spearrin
2017-06-27 09:04:51 -04:00
parent 075ba931ea
commit 9f1c445214
4 changed files with 21 additions and 3 deletions

View File

@@ -90,10 +90,19 @@ angular
for (var i = 0; i < keys.length; i++) {
var provider = $filter('filter')(constants.twoFactorProviderInfo, { type: keys[i], active: true });
if (provider.length && provider[0].priority > providerPriority) {
if (provider[0].type === constants.twoFactorProvider.u2f && !u2f.isSupported) {
continue;
}
providerType = provider[0].type;
providerPriority = provider[0].priority;
}
}
if (providerType === null) {
return null;
}
return parseInt(providerType);
}