mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
only copy totp key is setting not disabled
This commit is contained in:
parent
73b2ae71a9
commit
68e9cd3779
1 changed files with 10 additions and 5 deletions
|
@ -24,7 +24,8 @@ namespace Bit.iOS.Autofill
|
|||
{
|
||||
private Context _context;
|
||||
private bool _setupHockeyApp = false;
|
||||
private IGoogleAnalyticsService _googleAnalyticsService;
|
||||
private IGoogleAnalyticsService _googleAnalyticsService;
|
||||
private ISettings _settings;
|
||||
|
||||
public CredentialProviderViewController(IntPtr handle) : base(handle)
|
||||
{ }
|
||||
|
@ -36,7 +37,8 @@ namespace Bit.iOS.Autofill
|
|||
base.ViewDidLoad();
|
||||
_context = new Context();
|
||||
_context.ExtContext = ExtensionContext;
|
||||
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
|
||||
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
|
||||
_settings = Resolver.Resolve<ISettings>();
|
||||
|
||||
if(!_setupHockeyApp)
|
||||
{
|
||||
|
@ -234,11 +236,14 @@ namespace Bit.iOS.Autofill
|
|||
return;
|
||||
}
|
||||
|
||||
var totpKey = cipher.Login.Totp?.Decrypt(cipher.OrganizationId);
|
||||
string totpCode = null;
|
||||
if(!string.IsNullOrWhiteSpace(totpKey))
|
||||
if(!_settings.GetValueOrDefault(App.Constants.SettingDisableTotpCopy, false))
|
||||
{
|
||||
totpCode = Crypto.Totp(totpKey);
|
||||
var totpKey = cipher.Login.Totp?.Decrypt(cipher.OrganizationId);
|
||||
if(!string.IsNullOrWhiteSpace(totpKey))
|
||||
{
|
||||
totpCode = Crypto.Totp(totpKey);
|
||||
}
|
||||
}
|
||||
|
||||
CompleteRequest(cipher.Login.Username?.Decrypt(cipher.OrganizationId),
|
||||
|
|
Loading…
Reference in a new issue