mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
TokenService.cs: Check if key exists before deleting it (#168)
To avoid errors in Task<ApiResult<TokenResponse>> when logging in on UWP apps ensure that we check that they key exists before we delete the 2FA key token. Signed-off-by: Alistair Francis <alistair@alistair23.me>
This commit is contained in:
parent
daf6d1936f
commit
1d8fbac796
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ namespace Bit.App.Services
|
||||||
var tokenBytes = Encoding.UTF8.GetBytes(token);
|
var tokenBytes = Encoding.UTF8.GetBytes(token);
|
||||||
_secureStorage.Store(key, tokenBytes);
|
_secureStorage.Store(key, tokenBytes);
|
||||||
}
|
}
|
||||||
else
|
else if(_secureStorage.Contains(key))
|
||||||
{
|
{
|
||||||
_secureStorage.Delete(key);
|
_secureStorage.Delete(key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue