mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 07:43:37 +00:00
Added code to update PushToken that is used on login.
(cherry picked from commit 264b6791372b6a5d6c8c4f9e3c7e393b3ec4392b)
This commit is contained in:
@@ -5,10 +5,11 @@ namespace Bit.Core.Models.Request
|
|||||||
{
|
{
|
||||||
public class DeviceRequest
|
public class DeviceRequest
|
||||||
{
|
{
|
||||||
public DeviceRequest(string appId, IPlatformUtilsService platformUtilsService)
|
public DeviceRequest(string appId, string pushToken, IPlatformUtilsService platformUtilsService)
|
||||||
{
|
{
|
||||||
Type = platformUtilsService.GetDevice();
|
Type = platformUtilsService.GetDevice();
|
||||||
Name = platformUtilsService.GetDeviceString();
|
Name = platformUtilsService.GetDeviceString();
|
||||||
|
PushToken = pushToken;
|
||||||
Identifier = appId;
|
Identifier = appId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -300,7 +300,8 @@ namespace Bit.Core.Services
|
|||||||
{
|
{
|
||||||
var storedTwoFactorToken = await _tokenService.GetTwoFactorTokenAsync(email);
|
var storedTwoFactorToken = await _tokenService.GetTwoFactorTokenAsync(email);
|
||||||
var appId = await _appIdService.GetAppIdAsync();
|
var appId = await _appIdService.GetAppIdAsync();
|
||||||
var deviceRequest = new DeviceRequest(appId, _platformUtilsService);
|
var pushToken = await _stateService.GetPushCurrentTokenAsync();
|
||||||
|
var deviceRequest = new DeviceRequest(appId, pushToken, _platformUtilsService);
|
||||||
|
|
||||||
string[] emailPassword;
|
string[] emailPassword;
|
||||||
string[] codeCodeVerifier;
|
string[] codeCodeVerifier;
|
||||||
|
|||||||
Reference in New Issue
Block a user