1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-31 07:33:46 +00:00

Fixes for password reprompt (#1416)

This commit is contained in:
Oscar Hinton
2021-06-10 17:57:18 +02:00
committed by GitHub
parent 33791a03ac
commit 2b8dbde923
7 changed files with 90 additions and 18 deletions

View File

@@ -229,6 +229,12 @@ namespace Bit.App.Pages
var selection = await DisplayActionSheet(AppResources.Options, AppResources.Cancel,
AppResources.Delete, options.ToArray());
if (!await _vm.PromptPasswordAsync())
{
return;
}
if (selection == AppResources.Delete)
{
if (await _vm.DeleteAsync())

View File

@@ -176,6 +176,11 @@ namespace Bit.App.Services
var password = await _deviceActionService.DisplayPromptAync(AppResources.PasswordConfirmation,
AppResources.PasswordConfirmationDesc, null, AppResources.Submit, AppResources.Cancel, password: true);
if (password == null)
{
return false;
}
var valid = await validator(password);
if (!valid)

View File

@@ -82,7 +82,10 @@ namespace Bit.App.Utilities
}
else if (selection == AppResources.Edit)
{
await page.Navigation.PushModalAsync(new NavigationPage(new AddEditPage(cipher.Id)));
if (cipher.Reprompt == CipherRepromptType.None || await passwordRepromptService.ShowPasswordPromptAsync())
{
await page.Navigation.PushModalAsync(new NavigationPage(new AddEditPage(cipher.Id)));
}
}
else if (selection == AppResources.CopyUsername)
{