mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
PS-77 Updated two-factor email request to include the device identifier to check whether to send the 2fa email because of a new device (#1895)
This commit is contained in:
parent
1bbe8d8b98
commit
c251b950d1
2 changed files with 5 additions and 1 deletions
|
@ -29,6 +29,7 @@ namespace Bit.App.Pages
|
||||||
private readonly IBroadcasterService _broadcasterService;
|
private readonly IBroadcasterService _broadcasterService;
|
||||||
private readonly IStateService _stateService;
|
private readonly IStateService _stateService;
|
||||||
private readonly II18nService _i18nService;
|
private readonly II18nService _i18nService;
|
||||||
|
private readonly IAppIdService _appIdService;
|
||||||
|
|
||||||
private TwoFactorProviderType? _selectedProviderType;
|
private TwoFactorProviderType? _selectedProviderType;
|
||||||
private string _totpInstruction;
|
private string _totpInstruction;
|
||||||
|
@ -49,6 +50,7 @@ namespace Bit.App.Pages
|
||||||
_broadcasterService = ServiceContainer.Resolve<IBroadcasterService>("broadcasterService");
|
_broadcasterService = ServiceContainer.Resolve<IBroadcasterService>("broadcasterService");
|
||||||
_stateService = ServiceContainer.Resolve<IStateService>("stateService");
|
_stateService = ServiceContainer.Resolve<IStateService>("stateService");
|
||||||
_i18nService = ServiceContainer.Resolve<II18nService>("i18nService");
|
_i18nService = ServiceContainer.Resolve<II18nService>("i18nService");
|
||||||
|
_appIdService = ServiceContainer.Resolve<IAppIdService>("appIdService");
|
||||||
|
|
||||||
PageTitle = AppResources.TwoStepLogin;
|
PageTitle = AppResources.TwoStepLogin;
|
||||||
SubmitCommand = new Command(async () => await SubmitAsync());
|
SubmitCommand = new Command(async () => await SubmitAsync());
|
||||||
|
@ -380,7 +382,8 @@ namespace Bit.App.Pages
|
||||||
var request = new TwoFactorEmailRequest
|
var request = new TwoFactorEmailRequest
|
||||||
{
|
{
|
||||||
Email = _authService.Email,
|
Email = _authService.Email,
|
||||||
MasterPasswordHash = _authService.MasterPasswordHash
|
MasterPasswordHash = _authService.MasterPasswordHash,
|
||||||
|
DeviceIdentifier = await _appIdService.GetAppIdAsync()
|
||||||
};
|
};
|
||||||
await _apiService.PostTwoFactorEmailAsync(request);
|
await _apiService.PostTwoFactorEmailAsync(request);
|
||||||
if (showLoading)
|
if (showLoading)
|
||||||
|
|
|
@ -4,5 +4,6 @@
|
||||||
{
|
{
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public string MasterPasswordHash { get; set; }
|
public string MasterPasswordHash { get; set; }
|
||||||
|
public string DeviceIdentifier { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue