jfversluis / Plugin.Maui.FormsMigration

A .NET MAUI plugin that provides helpers to make your transition from Xamarin.Forms to .NET MAUI easier
MIT License
14 stars 2 forks source link

LegacySecureStorage.android: Remove(string) removes all entries #2

Closed eerojaaskelainen closed 4 months ago

eerojaaskelainen commented 4 months ago

Greetings! Thanks for your awesome work!

One issue I found with LegacySecureStorage:

https://github.com/jfversluis/Plugin.Maui.FormsMigration/blob/a73a639d23a18698a601c8cc3d509272e39bf49c/src/Plugin.Maui.FormsMigration/SecureStorage/LegacySecureStorage.android.cs#L50C27-L50C32

In Android, the "bool LegacySecureStorage.Remove(string)" command calls Preferences.Clear(alias); which removes all SecureStorage entries.

Should id be more like "Preferences.Remove(key, alias);" ?

jfversluis commented 4 months ago

You're absolutely right! Seems like a copy/paste error or something. Opened a PR and will release that immediately. Thank you!