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:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -1734,9 +1734,6 @@
|
||||
"windowsHelloConsentMessage": {
|
||||
"message": "Verify for Bitwarden."
|
||||
},
|
||||
"polkitConsentMessage": {
|
||||
"message": "Authenticate to unlock Bitwarden."
|
||||
},
|
||||
"unlockWithTouchId": {
|
||||
"message": "Unlock with Touch ID"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user