所以,我看过这篇文章:How to protect firebase Cloud Function HTTP endpoint to allow only Firebase authenticated users?
本质上,HTTPS endpoints 验证它来自 authorized use by ensuring Bearer token/Firebase ID is in the Authorization HTTP header.
I'm wondering, if someone found this Firebase ID, wouldn't this HTTP endpoint be compromised? 即,他们可以使用 Authorization: Bearer <Firebase ID Token>
传递持票人令牌
我已经看到其他方法可以使用Firebase实时数据库作为API本身,这可能更安全 .
好奇,如果我在这里遗漏了什么 .
1 回答
显然,你应该小心不要暴露这些令牌 . 但是你应该知道这些令牌expire after 1 hour并且需要由经过身份验证的客户端刷新 . 使用Firebase SDK时会自动执行此操作 . 因此,即使有人因粗心的应用程序设计而捕获其中一个令牌,它在现实世界中的用处非常有限 .