1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

Browser <-> desktop communication (#185)

* Add electron constant for browser integration

* Add constant for browser biometrics. Ensure biometry is locked on lock.

* Avoid saving keys outside desktop

* Fix eslint warning

* Add supportsSecureStorage helper to platformUtils to improve readability
This commit is contained in:
Oscar Hinton
2020-11-18 22:10:57 +01:00
committed by GitHub
parent f44e99d74d
commit 9e4d000b4d
8 changed files with 19 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ export class LockComponent implements OnInit {
this.pinSet = await this.vaultTimeoutService.isPinLockSet();
this.pinLock = (this.pinSet[0] && this.vaultTimeoutService.pinProtectedKey != null) || this.pinSet[1];
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
this.biometricLock = await this.vaultTimeoutService.isBiometricLockSet() && await this.cryptoService.hasKey();
this.biometricLock = await this.vaultTimeoutService.isBiometricLockSet() && (await this.cryptoService.hasKey() || !this.platformUtilsService.supportsSecureStorage());
this.biometricText = await this.storageService.get(ConstantsService.biometricText);
this.email = await this.userService.getEmail();
let vaultUrl = this.environmentService.getWebVaultUrl();
@@ -158,7 +158,6 @@ export class LockComponent implements OnInit {
}
const success = await this.platformUtilsService.authenticateBiometric();
this.vaultTimeoutService.biometricLocked = !success;
if (success) {
await this.doContinue();
}