verify fingerprint when enabling

This commit is contained in:
Kyle Spearrin 2019-05-30 22:50:58 -04:00
parent b356627afd
commit eecf81f0a5

View file

@ -243,7 +243,19 @@ namespace Bit.App.Pages
public async Task UpdateFingerprintAsync() public async Task UpdateFingerprintAsync()
{ {
_fingerprint = !_fingerprint; var current = _fingerprint;
if(_fingerprint)
{
_fingerprint = false;
}
else if(await _platformUtilsService.SupportsFingerprintAsync())
{
_fingerprint = await _platformUtilsService.AuthenticateFingerprintAsync();
}
if(_fingerprint == current)
{
return;
}
if(_fingerprint) if(_fingerprint)
{ {
await _storageService.SaveAsync(Constants.FingerprintUnlockKey, true); await _storageService.SaveAsync(Constants.FingerprintUnlockKey, true);