1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

biometrics cleanup (#964)

This commit is contained in:
Matt Portune
2020-06-08 08:25:13 -04:00
committed by GitHub
parent ec7d87e757
commit 5da2f3279b
18 changed files with 117 additions and 257 deletions

View File

@@ -48,8 +48,8 @@ namespace Bit.Core.Services
{
_key = key;
var option = await _storageService.GetAsync<int?>(Constants.VaultTimeoutKey);
var fingerprint = await _storageService.GetAsync<bool?>(Constants.FingerprintUnlockKey);
if (option.HasValue && !fingerprint.GetValueOrDefault())
var biometric = await _storageService.GetAsync<bool?>(Constants.BiometricUnlockKey);
if (option.HasValue && !biometric.GetValueOrDefault())
{
// If we have a lock option set, we do not store the key
return;
@@ -354,8 +354,8 @@ namespace Bit.Core.Services
{
var key = await GetKeyAsync();
var option = await _storageService.GetAsync<int?>(Constants.VaultTimeoutKey);
var fingerprint = await _storageService.GetAsync<bool?>(Constants.FingerprintUnlockKey);
if (!fingerprint.GetValueOrDefault() && (option != null || option == 0))
var biometric = await _storageService.GetAsync<bool?>(Constants.BiometricUnlockKey);
if (!biometric.GetValueOrDefault() && (option != null || option == 0))
{
await ClearKeyAsync();
_key = key;