From b1cc1743781833503033feb59947880816d3d206 Mon Sep 17 00:00:00 2001 From: eriklimakc Date: Fri, 23 Aug 2024 18:55:28 +0100 Subject: [PATCH] fix: Use ApplicationDataKeyValueStorage for wasm and desktop --- .../ServiceCollectionExtensions.cs | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/Uno.Extensions.Storage.UI/ServiceCollectionExtensions.cs b/src/Uno.Extensions.Storage.UI/ServiceCollectionExtensions.cs index 46487244de..d58f5b7c2e 100644 --- a/src/Uno.Extensions.Storage.UI/ServiceCollectionExtensions.cs +++ b/src/Uno.Extensions.Storage.UI/ServiceCollectionExtensions.cs @@ -63,7 +63,6 @@ public static IServiceCollection AddKeyedStorage(this IServiceCollection service ) #endif .SetDefaultInstance( -#if WINUI #if __ANDROID__ KeyStoreKeyValueStorage.Name #elif __IOS__ @@ -72,24 +71,9 @@ public static IServiceCollection AddKeyedStorage(this IServiceCollection service EncryptedApplicationDataKeyValueStorage.Name #else // For WASM and other platforms where we don't currently have - // a secure storage option, we default to InMemory to avoid + // a secure storage option, we default to ApplicationDataKeyValueStorage to avoid // security concerns with saving plain text - InMemoryKeyValueStorage.Name -#endif - -#else -#if __ANDROID__ - PasswordVaultKeyValueStorage.Name -#elif __IOS__ - PasswordVaultKeyValueStorage.Name -#elif WINDOWS_UWP - PasswordVaultKeyValueStorage.Name -#else - // For WASM and other platforms where we don't currently have - // a secure storage option, we default to InMemory to avoid - // security concerns with saving plain text - InMemoryKeyValueStorage.Name -#endif + ApplicationDataKeyValueStorage.Name #endif ); }