njosefbeck/gatsby-source-stripe

Avoid stripe secret key in gatsby-config?

JodyPSmith opened this issue · 2 comments

Is there a way to avoid putting the stripe secret key in the gatsby-config and accessing it from an environment variable instead? I'm a little weary of including sensitive keys in the repo.

Thanks for the question! I too would be leery of that. Thankfully you can use .env files to handle adding this kind of information to your gatsby-config.js file. More information can be found here: https://www.gatsbyjs.org/docs/environment-variables/

Let me know if you need any help with implementing a .env file! Closing for now.

Thanks for the link, I followed the guide and its working. Thanks for the source-stripe plugin too :).