mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-26 17:08:33 +01:00
not supported scenario
This commit is contained in:
parent
075ba931ea
commit
9f1c445214
@ -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);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
if (providers.hasOwnProperty(constants.twoFactorProvider.duo)) {
|
||||
add(constants.twoFactorProvider.duo);
|
||||
}
|
||||
if (providers.hasOwnProperty(constants.twoFactorProvider.u2f)) {
|
||||
if (providers.hasOwnProperty(constants.twoFactorProvider.u2f) && u2f.isSupported) {
|
||||
add(constants.twoFactorProvider.u2f);
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,15 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div ng-if="twoFactorProvider === null">
|
||||
<p>
|
||||
This account has two-factor login enabled, however, none of the configured two-factor providers are supported by this
|
||||
web browser.
|
||||
</p>
|
||||
Please use a supported web browser (such as Chrome) and/or add additional providers that are better supported
|
||||
across web browsers (such as an Authenticator App).
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<ul>
|
||||
<li>
|
||||
@ -151,4 +160,4 @@
|
||||
<li>
|
||||
<a ui-sref="frontend.login.info({returnState: returnState})">Back to log in</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
@ -22,7 +22,7 @@ var u2f = u2f || {};
|
||||
* Modification:
|
||||
* Check if browser supports U2F API before this wrapper was added.
|
||||
*/
|
||||
u2f.isSupported = ((typeof u2f !== 'undefined') && u2f.register) || (chrome && chrome.runtime);
|
||||
u2f.isSupported = !!(((typeof u2f !== 'undefined') && u2f.register) || (chrome && chrome.runtime));
|
||||
|
||||
/**
|
||||
* FIDO U2F Javascript API Version
|
||||
|
Loading…
Reference in New Issue
Block a user