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...