[英]How do I protect my API keys in my React App?
How do I go on about protecting my api keys in my react app ? 如何继续保护我的React应用中的api密钥? Do I set something up with express ?
我可以用express设置东西吗? I'm trying my best to avoid building anything on the server myself to make the API calls from there.
我正在尽力避免自己在服务器上构建任何东西以从那里进行API调用。 I am solely using firebase as my backend but I am making use of certain services such as emailjs.
我仅使用Firebase作为后端,但使用了某些服务,例如emailjs。 Is there anyway to make this call to emailjs without exposing it in my client code, without doing anything on my own server ?
无论如何,没有在我的客户端代码中公开它,也没有在我自己的服务器上执行任何操作的情况下,可以对emailjs进行此调用? Emailjs does not offer any encrypting or whitelisting.
Emailjs不提供任何加密或白名单。
emailjs.init("API_KEY");
You should use Firebase Functions to make your API calls since you are already using firebase. 您应该使用Firebase Functions进行API调用,因为您已经在使用Firebase。 See here: https://firebase.google.com/docs/functions/use-cases#integrate_with_third-party_services_and_apis
请参阅此处: https : //firebase.google.com/docs/functions/use-cases#integrate_with_third-party_services_and_apis
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.