Pregunta

I want do develop simple web app using Node.js (MEAN.io Fullstack). I am using Passport as authentication middleware. I especially want that on my app users can login with Twitter account.

Are my API key and API secret that i define in config/production.js file "secure". Can someone see their value and misuse them ?

¿Fue útil?

Solución

They are as secure as your server is. If someone breaks into your server, then it has full access to the source code and also the API keys.
If you trust your code to store passwords for databases, salts (e.g. for session cookies), etc, then you can trust it also for your API keys.
Please note that it's pretty standard to store API keys inside source/config files (in a non-publicly accessible folder - as would "public/" be, for example).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top