mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-20 02:01:47 +01:00
workaround for u2f bug in firefox on w10
This commit is contained in:
parent
2a6175060c
commit
6c110bb9a4
@ -912,6 +912,9 @@
|
|||||||
"popup2faCloseMessage": {
|
"popup2faCloseMessage": {
|
||||||
"message": "Clicking outside the popup window to check your email for your verification code will cause this popup to close. Do you want to open this popup in a new window so that it does not close?"
|
"message": "Clicking outside the popup window to check your email for your verification code will cause this popup to close. Do you want to open this popup in a new window so that it does not close?"
|
||||||
},
|
},
|
||||||
|
"popupU2fCloseMessage": {
|
||||||
|
"message": "This browser cannot process U2F requests in this popup window. Do you want to open this popup in a new window so that you can log in using U2F?"
|
||||||
|
},
|
||||||
"disableFavicon": {
|
"disableFavicon": {
|
||||||
"message": "Disable Website Icons"
|
"message": "Disable Website Icons"
|
||||||
},
|
},
|
||||||
|
@ -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();
|
const isSafari = this.platformUtilsService.isSafari();
|
||||||
this.showNewWindowMessage = isSafari;
|
this.showNewWindowMessage = isSafari;
|
||||||
|
|
||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
|
|
||||||
if (this.selectedProviderType == null) {
|
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 ||
|
const isDuo = this.selectedProviderType === TwoFactorProviderType.Duo ||
|
||||||
this.selectedProviderType === TwoFactorProviderType.OrganizationDuo;
|
this.selectedProviderType === TwoFactorProviderType.OrganizationDuo;
|
||||||
if (!isSafari || !isDuo) {
|
if (!isSafari || !isDuo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user