admin管理员组文章数量:1335651
I'm trying to integrate Stripe into a project of mine, and it looks like I can do it on my cloud functions. I'm following this official guide which tells me to add the API key to my firebase config. However, I don't see any files in my cloud functions project (created with npm) that have to do with Firebase config, and seem to match the syntax.
firebase functions:config:set stripe.secret=<YOUR STRIPE SECRET KEY>
What file should I update and where can I find it?
I'm trying to integrate Stripe into a project of mine, and it looks like I can do it on my cloud functions. I'm following this official guide which tells me to add the API key to my firebase config. However, I don't see any files in my cloud functions project (created with npm) that have to do with Firebase config, and seem to match the syntax.
firebase functions:config:set stripe.secret=<YOUR STRIPE SECRET KEY>
What file should I update and where can I find it?
Share Improve this question edited Nov 21, 2024 at 1:10 Frank van Puffelen 600k85 gold badges889 silver badges859 bronze badges Recognized by Google Cloud Collective asked Nov 20, 2024 at 22:23 saadmansaadman 218 bronze badges 1 |1 Answer
Reset to default 1The instructions are giving you a Firebase CLI command to run. That's what this is:
firebase functions:config:set stripe.secret=<YOUR STRIPE SECRET KEY>
You run the command with your stripe key instead of the placeholder.
There are no files to edit in this case.
You should keep in mind that the given way of setting config params using functions:config:set
is outdated, and you should look into the documentation for different and more secure ways of configuring parameters for your functions.
本文标签: How to configure the Stripe secret in Firebase Cloud FunctionsStack Overflow
版权声明:本文标题:How to configure the Stripe secret in Firebase Cloud Functions? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742325100a2453561.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
firebase functions:config:*
commands interact with an API (hosted athttps://runtimeconfig.googleapis/projects/${projectId}/configs
) where the values you provide are stored in your GCP project. They are not stored locally on disk (where they could be accidentally uploaded to git). – samthecodingman Commented Nov 20, 2024 at 22:52