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:
parent
daf6d1936f
commit
1d8fbac796
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user