mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
workaround for u2f bug in firefox on w10
This commit is contained in:
@@ -66,8 +66,15 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
});
|
||||
});
|
||||
|
||||
const isFirefox = this.platformUtilsService.isFirefox();
|
||||
if (this.popupUtilsService.inPopup(window) && isFirefox &&
|
||||
this.win.navigator.userAgent.indexOf('Windows NT 10.0;') > -1) {
|
||||
// ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1562620
|
||||
this.initU2f = false;
|
||||
}
|
||||
const isSafari = this.platformUtilsService.isSafari();
|
||||
this.showNewWindowMessage = isSafari;
|
||||
|
||||
await super.ngOnInit();
|
||||
|
||||
if (this.selectedProviderType == null) {
|
||||
@@ -83,6 +90,15 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.initU2f && this.selectedProviderType === TwoFactorProviderType.U2f &&
|
||||
this.popupUtilsService.inPopup(window)) {
|
||||
const confirmed = await this.platformUtilsService.showDialog(this.i18nService.t('popupU2fCloseMessage'),
|
||||
null, this.i18nService.t('yes'), this.i18nService.t('no'));
|
||||
if (confirmed) {
|
||||
this.popupUtilsService.popOut(window);
|
||||
}
|
||||
}
|
||||
|
||||
const isDuo = this.selectedProviderType === TwoFactorProviderType.Duo ||
|
||||
this.selectedProviderType === TwoFactorProviderType.OrganizationDuo;
|
||||
if (!isSafari || !isDuo) {
|
||||
|
||||
Reference in New Issue
Block a user