A small package to make interacting with Google Secret Manager easier.
final secretManager = await SecretManager.defaultCredentials();
final secret = await secretManager.getSecret('my-secret');
// use secret...
You can use LocalSecretManager
to read secrets from a file for use locally. Just make sure you don't check your secrets file into GitHub!
final secretManager = await LocalSecretManager.fromFile();
final secret = await secretManager.getSecret('my-secret');
// use secret...