mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
check email for null before authenticating (#1769)
* check email for null before authenticating * add return after logging out and track error if email not found
This commit is contained in:
parent
59ed76d956
commit
15e9915da6
1 changed files with 12 additions and 0 deletions
|
@ -10,6 +10,9 @@ using Bit.Core.Models.Domain;
|
|||
using Bit.Core.Models.Request;
|
||||
using Bit.Core.Utilities;
|
||||
using Xamarin.Forms;
|
||||
#if !FDROID
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
#endif
|
||||
|
||||
namespace Bit.App.Pages
|
||||
{
|
||||
|
@ -137,8 +140,17 @@ namespace Bit.App.Pages
|
|||
if (_usingKeyConnector && !(BiometricLock || PinLock))
|
||||
{
|
||||
await _vaultTimeoutService.LogOutAsync();
|
||||
return;
|
||||
}
|
||||
_email = await _userService.GetEmailAsync();
|
||||
if (string.IsNullOrWhiteSpace(_email))
|
||||
{
|
||||
await _vaultTimeoutService.LogOutAsync();
|
||||
#if !FDROID
|
||||
Crashes.TrackError(new NullReferenceException("Email not found in storage"));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
var webVault = _environmentService.GetWebVaultUrl();
|
||||
if (string.IsNullOrWhiteSpace(webVault))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue