1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-30 12:54:24 +01: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:
Alistair Francis 2017-11-13 04:47:58 -08:00 committed by Kyle Spearrin
parent daf6d1936f
commit 1d8fbac796

View File

@ -150,7 +150,7 @@ namespace Bit.App.Services
var tokenBytes = Encoding.UTF8.GetBytes(token);
_secureStorage.Store(key, tokenBytes);
}
else
else if(_secureStorage.Contains(key))
{
_secureStorage.Delete(key);
}