Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Flutter Secure Storage persist once the app closes?

Tags:

flutter

I tried to store usernames and passwords after someone logged in successfully with Flutter Secure Storage, but I wasn't able to read the keys. Is this expected behavior or am I doing something wrong?

like image 920
Lukas Weidinger Avatar asked Oct 17 '22 06:10

Lukas Weidinger


2 Answers

It is expected behavior that data written in secure storage persists after app is closed. Data is written in KeyStore and KeyChain on Android and iOS, respectively.

like image 141
Andrija Avatar answered Dec 23 '22 18:12

Andrija


It does. You'll have to share code so we can see what you're doing wrong. In the mean there is also another way as recommended by Flutter examples.

I've had a great experience using the SharedPreferences plugin. It's easy to asign key-value pairs and retrieve them.

like image 34
Filled Stacks Avatar answered Dec 23 '22 18:12

Filled Stacks