1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[PM-2772] add flag to deter process reload if cancel is clicked on biometrics (#7350)

* add flag to deter process reload if cancel is clicked on biometrics

* rename flag

* store biometrics cancelled to disk instead of integrating with process reload

* allow auto-prompt when opening app
This commit is contained in:
Jake Fink
2024-01-19 10:08:55 -05:00
committed by GitHub
parent ed101946b4
commit 07af08b893
6 changed files with 39 additions and 0 deletions

View File

@@ -910,6 +910,24 @@ export class StateService<
await this.saveSecureStorageKey(partialKeys.biometricKey, value, options);
}
async getBiometricPromptCancelled(options?: StorageOptions): Promise<boolean> {
const account = await this.getAccount(
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
);
return account?.settings?.biometricPromptCancelled;
}
async setBiometricPromptCancelled(value: boolean, options?: StorageOptions): Promise<void> {
const account = await this.getAccount(
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
);
account.settings.biometricPromptCancelled = value;
await this.saveAccount(
account,
this.reconcileOptions(options, await this.defaultOnDiskOptions()),
);
}
@withPrototypeForArrayMembers(CipherView, CipherView.fromJSON)
async getDecryptedCiphers(options?: StorageOptions): Promise<CipherView[]> {
return (