Lukas Weidinger
Lukas Weidinger

Reputation: 63

Does Flutter Secure Storage persist once the app closes?

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?

Upvotes: 6

Views: 10001

Answers (2)

Andrija
Andrija

Reputation: 14483

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.

Upvotes: 4

Filled Stacks
Filled Stacks

Reputation: 4346

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.

Upvotes: 1

Related Questions