-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
When I call Microsoft.Maui.Storage.SecureStorage.Default.RemoveAll() and then add a value, the value will disappear when restarting the app. Adding a value after restart will then again persist it properly.
Steps to Reproduce
Start Android App
Call Microsoft.Maui.Storage.SecureStorage.Default.RemoveAll();
Call: Microsoft.Maui.Storage.SecureStorage.Default.SetAsync(key, value)
Call: Microsoft.Maui.Storage.SecureStorage.Default.GetAsync(key) -> Returns the value
Restart App
Call: Microsoft.Maui.Storage.SecureStorage.Default.GetAsync(key) -> Value is gone
Call: Microsoft.Maui.Storage.SecureStorage.Default.SetAsync(key, value)
Call: Microsoft.Maui.Storage.SecureStorage.Default.GetAsync(key) -> Returns the value
Restart App:
Call: Microsoft.Maui.Storage.SecureStorage.Default.GetAsync(key) -> Returns the value
My conclusion is, that calling RemoveAll() will somehow break the SecureStorage until next app start
Link to public reproduction project repository
https://github.com/phillippschmedt/SecureStorageIssue (see MainPage.xaml.cs, use debugger to inspect)
Version with bug
8.0.6
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Tested on Android 13
Did you find any workaround?
Not yet
Relevant log output
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status