1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

Added code to update PushToken that is used on login.

(cherry picked from commit 264b6791372b6a5d6c8c4f9e3c7e393b3ec4392b)
This commit is contained in:
Todd Martin
2022-11-13 10:05:50 -05:00
parent 7e8e86a77a
commit 5b53c0c48f
2 changed files with 4 additions and 2 deletions

View File

@@ -5,10 +5,11 @@ namespace Bit.Core.Models.Request
{
public class DeviceRequest
{
public DeviceRequest(string appId, IPlatformUtilsService platformUtilsService)
public DeviceRequest(string appId, string pushToken, IPlatformUtilsService platformUtilsService)
{
Type = platformUtilsService.GetDevice();
Name = platformUtilsService.GetDeviceString();
PushToken = pushToken;
Identifier = appId;
}

View File

@@ -300,7 +300,8 @@ namespace Bit.Core.Services
{
var storedTwoFactorToken = await _tokenService.GetTwoFactorTokenAsync(email);
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[] codeCodeVerifier;