loadCustomPasswords method

void loadCustomPasswords(
  1. List<({String alias, String envName})> envPasswords
)

Registers passwords to be loaded from the env variables. The password can be accessed with the getPassword method. The envName is the name of the environment variable that contains the password. The alias is the key used to access the the password with the getPassword method. The alias also maps to the name in the config/passwords.yaml file. This method may throw a ArgumentError if any Serverpod reserved passwords are used as aliases or environment variables.

Implementation

void loadCustomPasswords(
  List<({String envName, String alias})> envPasswords,
) {
  _passwords = _passwordManager.mergePasswords(
    envPasswords,
    _passwords,
    environment: Platform.environment,
  );
}