Firebase - 什么是 API 密钥

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13863297/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 16:35:47  来源:igfitidea点击:

Firebase - What is the API Key

firebaseapi-key

提问by Sundararajan S

In Firebase, when we sign up , it gives us an API key for each firebase Url. But where is it used in a consuming application? The fireBase API does not provide any means to supply API Key.

在 Firebase 中,当我们注册时,它会为我们提供每个 Firebase Url 的 API 密钥。但是它在消费应用程序中在哪里使用?fireBase API 不提供任何方式来提供 API Key。

Security: What prevents anyone to go ahead and write any object to the given firebase Url? How is the authorization managed?

安全性:什么阻止任何人继续将任何对象写入给定的 Firebase Url?如何管理授权?

回答by Eliut Islas

You can generate your api key at https://console.developers.google.com/apis/credentials?project=[YOUR-PROJECT]

您可以在https://console.developers.google.com/apis/credentials?project=[YOUR-PROJECT]生成您的 api 密钥

Replace [YOUR-PROJECT] with your proyect ID.

将 [YOUR-PROJECT] 替换为您的项目 ID。

Find more information at https://support.google.com/cloud/answer/6158862

https://support.google.com/cloud/answer/6158862 上查找更多信息

regards.

问候。

回答by Andrew Lee

updated the links to the new Firebase website

更新了新 Firebase 网站的链接

Your question is very timely, as Firebase just announced its full security suite a few days ago.

您的问题非常及时,因为 Firebase 几天前刚刚宣布了其完整的安全套件。

There's a nice intro screencast and docs here: https://firebase.google.com/docs/database/security/

这里有一个很好的介绍截屏视频和文档:https: //firebase.google.com/docs/database/security/

The "API Key" is the old name for a Firebase Secret. This is used to generate Authentication Tokens to prove to Firebase who users are. You can see docs on authentication here: https://firebase.google.com/docs/auth/

“API 密钥”是 Firebase Secret 的旧名称。这用于生成身份验证令牌以向 Firebase 证明用户是谁。您可以在此处查看有关身份验证的文档:https: //firebase.google.com/docs/auth/