[PM-1497] Known device api error (#2418)

* [PM-1497] Ignore know device api error.
This commit is contained in:
André Bispo 2023-03-17 15:07:41 +00:00 committed by GitHub
parent 606b00142f
commit a6bb089633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,15 +150,21 @@ namespace Bit.App.Pages
{ {
Email = await _stateService.GetRememberedEmailAsync(); Email = await _stateService.GetRememberedEmailAsync();
} }
var deviceIdentifier = await _appIdService.GetAppIdAsync();
IsKnownDevice = await _apiService.GetKnownDeviceAsync(Email, deviceIdentifier);
CanRemoveAccount = await _stateService.GetActiveUserEmailAsync() != Email; CanRemoveAccount = await _stateService.GetActiveUserEmailAsync() != Email;
await _deviceActionService.HideLoadingAsync(); IsKnownDevice = await _apiService.GetKnownDeviceAsync(Email, await _appIdService.GetAppIdAsync());
}
catch (ApiException apiEx) when (apiEx.Error.StatusCode == System.Net.HttpStatusCode.Unauthorized)
{
_logger.Exception(apiEx);
} }
catch (Exception ex) catch (Exception ex)
{ {
HandleException(ex); HandleException(ex);
} }
finally
{
await _deviceActionService.HideLoadingAsync();
}
} }
public async Task LogInAsync(bool showLoading = true, bool checkForExistingAccount = false) public async Task LogInAsync(bool showLoading = true, bool checkForExistingAccount = false)