I'm not sure if I am misunderstanding something or if the firebase docs contradict themselves.
Here it seems to suggest to store api keys in in env variables: https://firebase.google.com/docs/functions/config-env For instance, to store the Client ID and API key for "Some Service", you might run: firebase functions:config:set someservice.key="THE API KEY" someservice.id="THE CLIENT ID"
But here it seems to say never to do it: https://firebase.google.com/support/guides/security-checklist#cloud_function_safety Cloud Function safety Never put sensitive information in a Cloud Function’s environment variables Often in a self-hosted Node.js app, you use environment variables to contain sensitive information like private keys. Do not do this in Cloud Functions.