1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

scan totp key

This commit is contained in:
Kyle Spearrin
2019-05-22 21:10:04 -04:00
parent b5522c1b5e
commit bfa336b72d
5 changed files with 60 additions and 7 deletions

View File

@@ -576,6 +576,23 @@ namespace Bit.App.Pages
ShowCardCode = !ShowCardCode;
}
public async Task UpdateTotpKeyAsync(string key)
{
if(Cipher?.Login != null)
{
if(!string.IsNullOrWhiteSpace(key))
{
Cipher.Login.Totp = key;
TriggerCipherChanged();
_platformUtilsService.ShowToast("info", null, AppResources.AuthenticatorKeyAdded);
}
else
{
await _platformUtilsService.ShowDialogAsync(AppResources.AuthenticatorKeyReadError);
}
}
}
private void TypeChanged()
{
if(Cipher != null && TypeSelectedIndex > -1)