1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-22 11:35:21 +01:00

[PM-5731] feat: ensure unlocked vault

This commit is contained in:
Andreas Coroiu 2024-01-30 14:40:48 +01:00
parent ca250c53ad
commit 4988dbea72
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A
2 changed files with 9 additions and 3 deletions

View File

@ -87,5 +87,12 @@ namespace Bit.Core.Abstractions
/// <param name="confirmNewCredentialParams">The parameters to use when asking the user to confirm the creation of a new credential.</param>
/// <returns>The ID of the cipher where the new credential should be saved.</returns>
Task<Fido2ConfirmNewCredentialResult> ConfirmNewCredentialAsync(Fido2ConfirmNewCredentialParams confirmNewCredentialParams);
/// <summary>
/// Make sure that the vault is unlocked.
/// This should open a window and ask the user to login or unlock the vault if necessary.
/// </summary>
/// <returns>When vault has been unlocked.</returns>
Task EnsureUnlockedVaultAsync();
}
}

View File

@ -24,7 +24,7 @@ namespace Bit.Core.Services
throw new NotSupportedError();
}
// await _userInterface.EnsureUnlockedVault();
await _userInterface.EnsureUnlockedVaultAsync();
await _syncService.FullSyncAsync(false);
var existingCipherIds = await FindExcludedCredentialsAsync(
@ -105,8 +105,7 @@ namespace Bit.Core.Services
{
List<CipherView> cipherOptions;
// TODO: Unlock vault somehow
// await userInterfaceSession.ensureUnlockedVault();
await _userInterface.EnsureUnlockedVaultAsync();
await _syncService.FullSyncAsync(false);
if (assertionParams.AllowCredentialDescriptorList?.Length > 0) {