mirror of
https://github.com/bitwarden/mobile
synced 2025-01-01 03:28:12 +01:00
Bug/cme autofill unlock (#1653)
* Show SSO login if using key-connector without bio or pin * remove additional call to enable biometrics and change method name - ordered methods to group private and public * allow sso for first biometric authenitcation
This commit is contained in:
parent
94994af4a9
commit
e9b0bbb3a9
@ -33,6 +33,7 @@ namespace Bit.iOS.Core.Controllers
|
||||
private bool _biometricLock;
|
||||
private bool _biometricIntegrityValid = true;
|
||||
private bool _passwordReprompt = false;
|
||||
private bool _usesKeyConnector;
|
||||
|
||||
protected bool autofillExtension = false;
|
||||
|
||||
@ -80,6 +81,7 @@ namespace Bit.iOS.Core.Controllers
|
||||
_cryptoService.HasKeyAsync().GetAwaiter().GetResult();
|
||||
_biometricIntegrityValid = _biometricService.ValidateIntegrityAsync(BiometricIntegrityKey).GetAwaiter()
|
||||
.GetResult();
|
||||
_usesKeyConnector = await _keyConnectorService.GetUsesKeyConnector();
|
||||
}
|
||||
|
||||
BaseNavItem.Title = _pinLock ? AppResources.VerifyPIN : AppResources.VerifyMasterPassword;
|
||||
@ -131,16 +133,18 @@ namespace Bit.iOS.Core.Controllers
|
||||
public override async void ViewDidAppear(bool animated)
|
||||
{
|
||||
base.ViewDidAppear(animated);
|
||||
if (!_biometricLock || !_biometricIntegrityValid)
|
||||
|
||||
// Users with key connector and without biometric or pin has no MP to unlock with
|
||||
if (_usesKeyConnector && (!(_pinLock || _biometricLock)) || ( _biometricLock && !_biometricIntegrityValid))
|
||||
{
|
||||
PromptSSO();
|
||||
}
|
||||
else if (!_biometricLock || !_biometricIntegrityValid)
|
||||
{
|
||||
MasterPasswordCell.TextField.BecomeFirstResponder();
|
||||
}
|
||||
|
||||
// Users with key connector and without biometric or pin has no MP to unlock with
|
||||
if (await _keyConnectorService.GetUsesKeyConnector() && !(_pinLock || _biometricLock))
|
||||
{
|
||||
PromptSSO();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user