mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 13:23:39 +00:00
migrate old enc key (#2732)
This commit is contained in:
@@ -1088,6 +1088,12 @@ namespace Bit.Core.Services
|
|||||||
{
|
{
|
||||||
await _stateService.SetUserKeyBiometricUnlockAsync(userKey, userId);
|
await _stateService.SetUserKeyBiometricUnlockAsync(userKey, userId);
|
||||||
}
|
}
|
||||||
|
// Clear old enc key only if we don't need to still migrate PIN
|
||||||
|
if (await _stateService.GetPinProtectedAsync() == null
|
||||||
|
&& await _stateService.GetPinProtectedKeyAsync() == null)
|
||||||
|
{
|
||||||
|
await _stateService.SetEncKeyEncryptedAsync(null, userId);
|
||||||
|
}
|
||||||
await _stateService.SetKeyEncryptedAsync(null, userId);
|
await _stateService.SetKeyEncryptedAsync(null, userId);
|
||||||
|
|
||||||
// Set encrypted user key just in case the user locks without syncing
|
// Set encrypted user key just in case the user locks without syncing
|
||||||
|
|||||||
Reference in New Issue
Block a user