re-base icon indicating copy to clipboard operation
re-base copied to clipboard

Where to store API key?

Open Matt-Hill-83 opened this issue 6 years ago • 2 comments

Hi, First, great work on such a thoroughly built app! I'm new to most of this stuff, but it seems risky to store your API key in your client code in App.js Is there a way to adapt this architecture so that your API Key is store somewhere else, perhaps in a Firebase 'function' in the cloud?

Thanks~

  • matt

Matt-Hill-83 avatar May 25 '19 19:05 Matt-Hill-83

You should use Dotenv to store sensitive information. Take a look at the documentation and you ought to find your way around fairly easy. :)

dpw1 avatar Jun 15 '19 00:06 dpw1

If you are going to use create-react-app, you can just use the React default one https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables Not sure if it's safe tho.

ghost avatar Jun 16 '19 15:06 ghost