1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01:00

[PM-1431] [Defect] [Android] New accounts are not able to log in (#2417)

* [PM-1431] Do not clear Master password  if login is ongoing.
This commit is contained in:
André Bispo 2023-03-16 12:48:40 +00:00 committed by GitHub
parent ccd71202de
commit 151ecf83e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,7 @@ namespace Bit.App.Pages
private string _masterPassword;
private bool _isEmailEnabled;
private bool _isKnownDevice;
private bool _isExecutingLogin;
public LoginPageViewModel()
{
@ -192,6 +193,7 @@ namespace Bit.App.Pages
ShowPassword = false;
try
{
_isExecutingLogin = true;
if (checkForExistingAccount)
{
var userId = await _stateService.GetUserIdAsync(Email);
@ -253,14 +255,21 @@ namespace Bit.App.Pages
AppResources.AnErrorHasOccurred, AppResources.Ok);
}
}
finally
{
_isExecutingLogin = false;
}
}
public void ResetPasswordField()
{
try
{
MasterPassword = string.Empty;
ShowPassword = false;
if (!_isExecutingLogin)
{
MasterPassword = string.Empty;
ShowPassword = false;
}
}
catch (Exception ex)
{