如何使用 firebase 规则进行身份验证 (RESTful)

How to authenticate with firebase rules (RESTful)

我不确定在向 firebase 发出请求时将我的身份验证 uid 令牌传递到哪里。

我试过:

[myfirebaseurl]/path/1234.json?auth=[uid that i set].

连同将 UID 放入 header、内容和授权。在将其放入我的应用程序之前,我目前正在对 reqbin 进行测试。

基本上,它是 url 参数,header,还是我应该将我在 firebase 规则选项卡中设置的 UID 传递到哪里?

感谢您的帮助!

您似乎在尝试 authenticate with an ID token。 ID 令牌与 UID 不同,如果您只需要他们的 UID,那么访问其他人的帐户就太容易了。

您需要 retrieve an ID token 并在当前使用 UID 的地方使用它。