mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 01:03:24 +00:00
[PM-5154] Implement combined view for passwords and passkeys on iOS Autofill extension (#3075)
* PM-5154 Implemented combined view of passwords and passkeys and improved search and items UI * PM-5154 Code improvement from PR feedback * PM-5154 Code improvement to log unknown exceptions
This commit is contained in:
committed by
GitHub
parent
53aedea93a
commit
144fc7c727
@@ -88,56 +88,13 @@ namespace Bit.iOS.Autofill
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_context.ServiceIdentifiers == null || _context.ServiceIdentifiers.Length == 0)
|
||||
{
|
||||
PerformSegue(SegueConstants.LOGIN_SEARCH, this);
|
||||
}
|
||||
else
|
||||
if (_context.IsCreatingOrPreparingListForPasskey || _context.ServiceIdentifiers?.Length > 0)
|
||||
{
|
||||
PerformSegue(SegueConstants.LOGIN_LIST, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnProvidingCredentialException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[Export("prepareCredentialListForServiceIdentifiers:requestParameters:")]
|
||||
public override async void PrepareCredentialList(ASCredentialServiceIdentifier[] serviceIdentifiers, ASPasskeyCredentialRequestParameters requestParameters)
|
||||
{
|
||||
try
|
||||
{
|
||||
InitAppIfNeeded();
|
||||
_context.VaultUnlockedDuringThisSession = false;
|
||||
_context.ServiceIdentifiers = serviceIdentifiers;
|
||||
if (serviceIdentifiers.Length > 0)
|
||||
{
|
||||
var uri = serviceIdentifiers[0].Identifier;
|
||||
if (serviceIdentifiers[0].Type == ASCredentialServiceIdentifierType.Domain)
|
||||
{
|
||||
uri = string.Concat("https://", uri);
|
||||
}
|
||||
_context.UrlString = uri;
|
||||
}
|
||||
if (!await IsAuthed())
|
||||
{
|
||||
await _accountsManager.NavigateOnAccountChangeAsync(false);
|
||||
}
|
||||
else if (await IsLocked())
|
||||
{
|
||||
PerformSegue(SegueConstants.LOCK, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_context.ServiceIdentifiers == null || _context.ServiceIdentifiers.Length == 0)
|
||||
{
|
||||
PerformSegue(SegueConstants.LOGIN_SEARCH, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
PerformSegue(SegueConstants.LOGIN_LIST, this);
|
||||
PerformSegue(SegueConstants.LOGIN_SEARCH, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -306,6 +263,8 @@ namespace Bit.iOS.Autofill
|
||||
return;
|
||||
}
|
||||
|
||||
_context.PickCredentialForFido2GetAssertionFromListTcs?.TrySetCanceled();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(totp))
|
||||
{
|
||||
UIPasteboard.General.String = totp;
|
||||
@@ -324,7 +283,7 @@ namespace Bit.iOS.Autofill
|
||||
});
|
||||
}
|
||||
|
||||
private void OnProvidingCredentialException(Exception ex)
|
||||
internal void OnProvidingCredentialException(Exception ex)
|
||||
{
|
||||
LoggerHelper.LogEvenIfCantBeResolved(ex);
|
||||
CancelRequest(ASExtensionErrorCode.Failed);
|
||||
|
||||
Reference in New Issue
Block a user