1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 19:23:52 +00:00

[BEEEP/PM-10534] Add snap biometric support (#12187)

* Add snap biometric support

* Fix linting

* Remove unused message

* Disable snap browser integration again
This commit is contained in:
Bernd Schoolmann
2024-12-11 07:10:06 -08:00
committed by GitHub
parent b2ee27c02f
commit 92a620dd9c
5 changed files with 34 additions and 8 deletions

View File

@@ -87,8 +87,8 @@ export default class BiometricUnixMain implements OsBiometricService {
}
async authenticateBiometric(): Promise<boolean> {
const hwnd = this.windowMain.win.getNativeWindowHandle();
return await biometrics.prompt(hwnd, this.i18nservice.t("polkitConsentMessage"));
const hwnd = Buffer.from("");
return await biometrics.prompt(hwnd, "");
}
async osSupportsBiometric(): Promise<boolean> {
@@ -98,10 +98,14 @@ export default class BiometricUnixMain implements OsBiometricService {
// This could be dynamically detected on dbus in the future.
// We should check if a libsecret implementation is available on the system
// because otherwise we cannot offlod the protected userkey to secure storage.
return (await passwords.isAvailable()) && !isSnapStore();
return await passwords.isAvailable();
}
async osBiometricsNeedsSetup(): Promise<boolean> {
if (isSnapStore()) {
return false;
}
// check whether the polkit policy is loaded via dbus call to polkit
return !(await biometrics.available());
}

View File

@@ -1734,9 +1734,6 @@
"windowsHelloConsentMessage": {
"message": "Verify for Bitwarden."
},
"polkitConsentMessage": {
"message": "Authenticate to unlock Bitwarden."
},
"unlockWithTouchId": {
"message": "Unlock with Touch ID"
},