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:
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user