Skip to content

Commit

Permalink
fix: Use ApplicationDataKeyValueStorage for wasm and desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklimakc committed Aug 23, 2024
1 parent eede1fe commit 0d3ef02
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/Uno.Extensions.Storage.UI/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public static IServiceCollection AddKeyedStorage(this IServiceCollection service
)
#endif
.SetDefaultInstance<IKeyValueStorage>(
#if WINUI
#if __ANDROID__
KeyStoreKeyValueStorage.Name
#elif __IOS__
Expand All @@ -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
);
}
Expand Down

0 comments on commit 0d3ef02

Please sign in to comment.