Flutter plugin that stores secrets in each platform's secure storage
open sourceBSD-3-Clausefree
flutter_secure_storage is a Flutter plugin for storing sensitive data as key-value pairs in each platform's secure storage. It uses the Keychain on iOS and macOS (with the Secure Enclave optionally), custom ciphers on Android (RSA OAEP with AES-GCM by default since version 10, with optional biometric authentication) and platform mechanisms on Windows, Linux and the web. Encryption algorithms, keychain accessibility and biometric requirements are configurable. German Saprykin created it, and Julian Steenbakker maintains it.
Problems it solves
- store an auth token securely in a Flutter app
- keep API keys and passwords out of plain shared preferences in Flutter
- require fingerprint or face unlock before a Flutter app reads a secret
Features
- Keychain storage on iOS and macOS, with Secure Enclave support
- Android encryption with RSA OAEP and AES-GCM by default
- Optional biometric authentication on Android, iOS and macOS
- Android, iOS, macOS, Windows, Linux and web
- Automatic migration from older Android ciphers
Limitations
- On the web it works only over HTTPS or on localhost.1
Alternatives
The same job
These do what flutter_secure_storage does.
- local_auth Flutter plugin for local authentication with biometrics, passcode, PIN or pattern
- shared_preferences Flutter plugin for storing simple key-value settings on the device
- google_sign_in Flutter plugin for signing in with a Google account
- Flutter Packages Flutter's first-party packages and plugins, maintained by the Flutter team
