简体   繁体   English

如何在React App中保护我的API密钥?

[英]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.

相关问题 github 副驾驶赠送 API 钥匙? 如何保护我的钥匙? - github copilot giving away API keys? how can I protect my keys? 如何让我的 React 应用获取我的代理 API? - How do I make my react app fetch my proxy API? 如何保护音频文件并在我的反应原生应用程序中播放? - How can i protect audio file and play in my react native app? 如何创建环境变量以保护我的网站的Google Maps API密钥(或任何其他秘密值)? - How do I create environment variables to protect my Google Maps API Key(or any other secret value) for my website? 我如何通过我的反应应用程序上的 Axios 从 Imgur 的 API 发出 GET 请求 - How do i make a GET requests from Imgur's API via Axios on my react app 克隆后如何启动我的 React 应用程序? - How do I start my React App After I clone it? 如何在我的 React 应用程序中实现 Sequalize API? - How do I implement a Sequalize API into my React application? 如何在React Component上显示我的API信息? - How do I display my API information onto React Component? 如何在我的 React 应用程序中访问 API 的属性? - How do I access the properties of API in my react application? 如何在反应中访问我的 HTML 中的 API 数据 - How do I access API data in my HTML in react
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM