flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

[web] `deleteAll` clears entire local storage

Open ashley-arta opened this issue 1 year ago • 0 comments

https://github.com/mogol/flutter_secure_storage/blob/57c2b54c3e1a839d1f6754a487b85b44e027b46d/flutter_secure_storage_web/lib/flutter_secure_storage_web.dart#L49

This line will remove everything in local storage, even if they were inserted by other libraries or the App.

Suggestions:

  1. only clear the keys that were inserted through secure storage
  2. or, only clear the keys that are prefixed with ${options[_publicKey]!}.. It's a little riskier but saves memory. What do you think?

ashley-arta avatar Sep 26 '23 05:09 ashley-arta