1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-20 01:13:30 +00:00

Added GetOrDeriveMasterKey to UserVerificationService (#2808)

This commit is contained in:
aj-rosado
2023-10-03 12:54:22 +01:00
committed by GitHub
parent 685e0f407a
commit f2be840a7d
4 changed files with 16 additions and 8 deletions

View File

@@ -51,13 +51,7 @@ namespace Bit.App.Services
{
await AppHelpers.ResetInvalidUnlockAttemptsAsync();
var userKey = await _cryptoService.DecryptUserKeyWithMasterKeyAsync(masterKey);
await _cryptoService.SetMasterKeyAsync(masterKey);
var hasKey = await _cryptoService.HasUserKeyAsync();
if (!hasKey)
{
await _cryptoService.SetUserKeyAsync(userKey);
}
await _cryptoService.UpdateMasterKeyAndUserKeyAsync(masterKey);
}
return passwordValid;