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

Automatic biometrics prompt (#2065)

Co-authored-by: Michael Cho <mcho@tutanota.com>
This commit is contained in:
Dane Powell
2021-09-17 01:22:46 -07:00
committed by GitHub
parent bb99af6e24
commit 7d797f73fe
5 changed files with 29 additions and 2 deletions

View File

@@ -56,6 +56,7 @@ export class SettingsComponent implements OnInit {
pin: boolean = null;
supportsBiometric: boolean;
biometric: boolean = false;
disableAutoBiometricsPrompt = true;
previousVaultTimeout: number = null;
vaultTimeout: FormControl = new FormControl(null);
@@ -115,6 +116,8 @@ export class SettingsComponent implements OnInit {
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
this.biometric = await this.vaultTimeoutService.isBiometricLockSet();
this.disableAutoBiometricsPrompt = await this.storageService.get<boolean>(
ConstantsService.disableAutoBiometricsPromptKey) ?? true;
}
async saveVaultTimeout(newValue: number) {
@@ -250,6 +253,10 @@ export class SettingsComponent implements OnInit {
}
}
async updateAutoBiometricsPrompt() {
await this.storageService.save(ConstantsService.disableAutoBiometricsPromptKey, this.disableAutoBiometricsPrompt);
}
async lock() {
await this.vaultTimeoutService.lock(true);
}