1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-07 11:03:54 +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:
Matt Portune
2022-03-17 14:27:01 -04:00
committed by GitHub
parent 507c3faea1
commit c1748acf39
11 changed files with 30 additions and 14 deletions

View File

@@ -46,5 +46,6 @@ namespace Bit.App.Abstractions
void CloseMainApp();
bool SupportsFido2();
float GetSystemFontSizeScale();
Task OnAccountSwitchCompleteAsync();
}
}

View File

@@ -428,7 +428,7 @@ namespace Bit.App
});
}
private async Task LockedAsync(string userId, bool autoPromptBiometric)
private async Task LockedAsync(string userId, bool userInitiated)
{
if (!await _stateService.IsActiveAccountAsync(userId))
{
@@ -436,6 +436,7 @@ namespace Bit.App
return;
}
var autoPromptBiometric = !userInitiated;
if (autoPromptBiometric && Device.RuntimePlatform == Device.iOS)
{
var vaultTimeout = await _stateService.GetVaultTimeoutAsync();

View File

@@ -29,6 +29,8 @@ namespace Bit.App.Services
Constants.iOSAutoFillBiometricIntegrityKey,
Constants.iOSExtensionClearCiphersCacheKey,
Constants.iOSExtensionBiometricIntegrityKey,
Constants.iOSShareExtensionClearCiphersCacheKey,
Constants.iOSShareExtensionBiometricIntegrityKey,
Constants.RememberedEmailKey,
Constants.RememberedOrgIdentifierKey,
};

View File

@@ -556,6 +556,8 @@ namespace Bit.App.Utilities
var environmentService = ServiceContainer.Resolve<IEnvironmentService>("environmentService");
await environmentService.SetUrlsFromStorageAsync();
await ClearServiceCacheAsync();
var deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
await deviceActionService.OnAccountSwitchCompleteAsync();
}
public static async Task ClearServiceCacheAsync()