mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
Desktop biometrics support (#119)
* Initial work on windows hello support * Switch to use windows.security.credentials.ui UserConsentVerifier * Fix linting warnings * Remove unessesary supportsBiometric from lock screen * Rename biometric.main to windows.biometric.main. Add abstraction for biometric. * Add support for dynamic biometric text. * Add untested darwin implementation * Rename fingerprintUnlock to biometric * Add new functions to cliPlatformUtils.service.ts. * Hide login if biometric is not supported * Export default for biometric.*.main.ts * Remove @nodert-win10-rs4/windows.security.credentials * Add build requirements to readme * Auto prompt biometric when starting the application. * Ensure we support biometric before trying to auto prompt. * Fix review comments and linting errors
This commit is contained in:
@@ -42,7 +42,8 @@ export class CryptoService implements CryptoServiceAbstraction {
|
||||
this.key = key;
|
||||
|
||||
const option = await this.storageService.get<number>(ConstantsService.vaultTimeoutKey);
|
||||
if (option != null) {
|
||||
const biometric = await this.storageService.get<boolean>(ConstantsService.biometricUnlockKey);
|
||||
if (option != null && !biometric) {
|
||||
// if we have a lock option set, we do not store the key
|
||||
return;
|
||||
}
|
||||
@@ -291,7 +292,8 @@ export class CryptoService implements CryptoServiceAbstraction {
|
||||
async toggleKey(): Promise<any> {
|
||||
const key = await this.getKey();
|
||||
const option = await this.storageService.get(ConstantsService.vaultTimeoutKey);
|
||||
if (option != null || option === 0) {
|
||||
const biometric = await this.storageService.get(ConstantsService.biometricUnlockKey);
|
||||
if (!biometric && (option != null || option === 0)) {
|
||||
// if we have a lock option set, clear the key
|
||||
await this.clearKey();
|
||||
this.key = key;
|
||||
|
||||
Reference in New Issue
Block a user