1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-06 23:51:28 +01:00

PM-17042: Biometrics auto prompt popup does not show up on safari (#12868)

This is due to missing await before process reload, triggered by lock, effectively disabling the biometrics auto prompt on safari.
This should be detected by eslint, but due to misconfiguration, nothing was reported. Also fixed two other missing awaits on biometrics unlock.
This commit is contained in:
Maciej Zieniuk 2025-01-15 16:29:37 +01:00 committed by GitHub
parent ee6822c00d
commit bdab4aa939
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -97,7 +97,7 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
if (await this.keyService.validateUserKey(userKey, userId)) {
await this.biometricStateService.setBiometricUnlockEnabled(true);
await this.biometricStateService.setFingerprintValidated(true);
this.keyService.setUserKey(userKey, userId);
await this.keyService.setUserKey(userKey, userId);
return userKey;
}
} else {
@ -115,7 +115,7 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
if (await this.keyService.validateUserKey(userKey, userId)) {
await this.biometricStateService.setBiometricUnlockEnabled(true);
await this.biometricStateService.setFingerprintValidated(true);
this.keyService.setUserKey(userKey, userId);
await this.keyService.setUserKey(userKey, userId);
return userKey;
}
} else {

View File

@ -137,8 +137,8 @@ export class AppComponent implements OnInit, OnDestroy {
this.toastService._showToast(msg);
} else if (msg.command === "reloadProcess") {
if (this.platformUtilsService.isSafari()) {
window.setTimeout(() => {
this.biometricStateService.updateLastProcessReload();
window.setTimeout(async () => {
await this.biometricStateService.updateLastProcessReload();
window.location.reload();
}, 2000);
}

View File

@ -36,6 +36,8 @@
"@bitwarden/platform": ["./libs/platform/src"],
"@bitwarden/node/*": ["./libs/node/src/*"],
"@bitwarden/vault": ["./libs/vault/src"],
"@bitwarden/key-management": ["./libs/key-management/src"],
"@bitwarden/key-management/angular": ["./libs/key-management/src/angular"],
"@bitwarden/bit-common/*": ["./bitwarden_license/bit-common/src/*"]
},
"plugins": [