mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-25 12:05:59 +01:00
Merge branch 'master' into feature/maui-migration
This commit is contained in:
commit
0348940a12
@ -63,12 +63,20 @@ namespace Bit.Core.Services
|
||||
/// </param>
|
||||
public async Task<bool> IsLockedAsync(string userId = null)
|
||||
{
|
||||
// If biometrics are used, we can use the flag to determine locked state taking into account the auto unlock key for vault timeout never.
|
||||
var biometricSet = await IsBiometricLockSetAsync(userId);
|
||||
var hasAutoUnlockKey = await _cryptoService.HasAutoUnlockKeyAsync(userId);
|
||||
if (biometricSet && await _stateService.GetBiometricLockedAsync(userId) && !hasAutoUnlockKey)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!await _cryptoService.HasUserKeyAsync(userId))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Filter out accounts without auto key
|
||||
if (!await _cryptoService.HasAutoUnlockKeyAsync(userId))
|
||||
if (!hasAutoUnlockKey)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -84,7 +92,6 @@ namespace Bit.Core.Services
|
||||
// Legacy users must migrate on web vault before login
|
||||
await LogOutAsync(false, userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check again to verify auto key was set
|
||||
|
Loading…
Reference in New Issue
Block a user