mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
[PM-3333] Check for purged admin auth requests (#2671)
* [PM-3333] Check for purged admin auth requests Co-authored-by: Federico Maccaroni <fedemkr@gmail.com> --------- Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
This commit is contained in:
@@ -246,6 +246,7 @@ namespace Bit.App.Pages
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
await _stateService.SetPendingAdminAuthRequestAsync(null);
|
||||||
StartDeviceApprovalOptionsAction?.Invoke();
|
StartDeviceApprovalOptionsAction?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -609,10 +609,18 @@ namespace Bit.Core.Services
|
|||||||
return await PopulateFingerprintPhrasesAsync(activeRequests);
|
return await PopulateFingerprintPhrasesAsync(activeRequests);
|
||||||
}
|
}
|
||||||
public async Task<PasswordlessLoginResponse> GetPasswordlessLoginRequestByIdAsync(string id)
|
public async Task<PasswordlessLoginResponse> GetPasswordlessLoginRequestByIdAsync(string id)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var response = await _apiService.GetAuthRequestAsync(id);
|
var response = await _apiService.GetAuthRequestAsync(id);
|
||||||
return await PopulateFingerprintPhraseAsync(response, await _stateService.GetEmailAsync());
|
return await PopulateFingerprintPhraseAsync(response, await _stateService.GetEmailAsync());
|
||||||
}
|
}
|
||||||
|
catch (ApiException ex) when (ex.Error?.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
// Thrown when request expires and purge job erases it from the db
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<PasswordlessLoginResponse> GetPasswordlessLoginResquestAsync(string id, string accessCode)
|
public async Task<PasswordlessLoginResponse> GetPasswordlessLoginResquestAsync(string id, string accessCode)
|
||||||
|
|||||||
Reference in New Issue
Block a user