Replies: 2 comments
-
Hi @mackelito Although you technically can put secrets in them, this is not a good idea because as you rightly say, secrets should not exist in source code repositories. If you really want to do it this way, you could add The recommended solutions to this are the firebase function configs (which is gen1 functions only and deprecated), or use |
Beta Was this translation helpful? Give feedback.
-
But let's say I want to use secrets.. should I have 2 secrets per environment? How do we check for environment in our main.ts file? |
Beta Was this translation helpful? Give feedback.
-
So I'm a rookie when it comes to firebase functions so I might be totally off here..
but reading over at https://firebase.google.com/docs/functions/config-env?gen=2nd#migrating_from_environment_configuration makes me think that env variables will be replaces by secrets!?
Also I wonder how I should think about secrets and config..?
Lets say I have apiKey, one for prod and one for test.. normally I would use the .env and .env.local.. but now I'm really not sure :D
from what I can tell.. deploying will include the .env file but it seems as firebase discourage from using this approach as it's not considered safe to have data like this in your repository...
Beta Was this translation helpful? Give feedback.
All reactions