clear master password on login
This commit is contained in:
parent
786f3b4644
commit
faccb61a6b
|
@ -20,6 +20,7 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
private bool _showPassword;
|
private bool _showPassword;
|
||||||
private string _email;
|
private string _email;
|
||||||
|
private string _masterPassword;
|
||||||
|
|
||||||
public LoginPageViewModel()
|
public LoginPageViewModel()
|
||||||
{
|
{
|
||||||
|
@ -48,9 +49,14 @@ namespace Bit.App.Pages
|
||||||
set => SetProperty(ref _email, value);
|
set => SetProperty(ref _email, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string MasterPassword
|
||||||
|
{
|
||||||
|
get => _masterPassword;
|
||||||
|
set => SetProperty(ref _masterPassword, value);
|
||||||
|
}
|
||||||
|
|
||||||
public Command TogglePasswordCommand { get; }
|
public Command TogglePasswordCommand { get; }
|
||||||
public string ShowPasswordIcon => ShowPassword ? "" : "";
|
public string ShowPasswordIcon => ShowPassword ? "" : "";
|
||||||
public string MasterPassword { get; set; }
|
|
||||||
public bool RememberEmail { get; set; }
|
public bool RememberEmail { get; set; }
|
||||||
|
|
||||||
public async Task InitAsync()
|
public async Task InitAsync()
|
||||||
|
@ -89,6 +95,7 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
await _deviceActionService.ShowLoadingAsync(AppResources.LoggingIn);
|
await _deviceActionService.ShowLoadingAsync(AppResources.LoggingIn);
|
||||||
var response = await _authService.LogInAsync(Email, MasterPassword);
|
var response = await _authService.LogInAsync(Email, MasterPassword);
|
||||||
|
MasterPassword = string.Empty;
|
||||||
if(RememberEmail)
|
if(RememberEmail)
|
||||||
{
|
{
|
||||||
await _storageService.SaveAsync(Keys_RememberedEmail, Email);
|
await _storageService.SaveAsync(Keys_RememberedEmail, Email);
|
||||||
|
|
Loading…
Reference in New Issue