mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 16:23:29 +00:00
Misc fixes for account switching (#1849)
* Misc fixes for account switching * use unique bio integrity key in ShareExtension
This commit is contained in:
@@ -594,6 +594,11 @@ namespace Bit.iOS.Core.Services
|
||||
return scaledHeight / tempHeight;
|
||||
}
|
||||
|
||||
public async Task OnAccountSwitchCompleteAsync()
|
||||
{
|
||||
await ASHelpers.ReplaceAllIdentities();
|
||||
}
|
||||
|
||||
public class PickerDelegate : UIDocumentPickerDelegate
|
||||
{
|
||||
private readonly DeviceActionService _deviceActionService;
|
||||
|
||||
@@ -20,11 +20,13 @@ namespace Bit.iOS.Core.Utilities
|
||||
var timeoutAction = await stateService.GetVaultTimeoutActionAsync();
|
||||
if (timeoutAction == VaultTimeoutAction.Logout)
|
||||
{
|
||||
await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
|
||||
return;
|
||||
}
|
||||
var vaultTimeoutService = ServiceContainer.Resolve<IVaultTimeoutService>("vaultTimeoutService");
|
||||
if (await vaultTimeoutService.IsLockedAsync())
|
||||
{
|
||||
await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
|
||||
await storageService.SaveAsync(Constants.AutofillNeedsIdentityReplacementKey, true);
|
||||
return;
|
||||
}
|
||||
@@ -43,7 +45,9 @@ namespace Bit.iOS.Core.Utilities
|
||||
{
|
||||
await ASCredentialIdentityStore.SharedStore?.ReplaceCredentialIdentitiesAsync(identities.ToArray());
|
||||
await storageService.SaveAsync(Constants.AutofillNeedsIdentityReplacementKey, false);
|
||||
return;
|
||||
}
|
||||
await ASCredentialIdentityStore.SharedStore?.RemoveAllCredentialIdentitiesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user