secret_manager 1.1.0 secret_manager: ^1.1.0 copied to clipboard
Access your secrets no matter where they're stored.
Secret Manager #
Access your secrets no matter where they're stored. Built in support for reading secrets from:
- Environment variables
- A local File
If you'd like to read from GCP Secret Manager, you can use gcp_secret_manager.
Environment Variables #
final secretManager = await EnvironmentSecretManager();
final secret = secretManager.getSecret('my-secret');
// use secret...
Local File #
Just make sure you don't check your secrets file into version control!
final secretManager = await LocalSecretManager.fromFile();
final secret = secretManager.getSecret('my-secret');
// use secret...