简体   繁体   English

如果需要验证,如何通过POSTMAN在FIREBASE上修补数据

[英]How to patch data on FIREBASE through POSTMAN if authotization is needed

I created an android app that connect to firebase, i need to update the data through REST api and due to security, i set the rules of firebase to 我创建了一个连接到Firebase的Android应用,我需要通过REST API更新数据,并且由于安全性,我将Firebase的规则设置为

"sensor": {
   ".read": "auth != null",
   ".write": "auth != null"
}

i am testing on POSTMAN but i found that i cannot patch the data after i applied the rules, i have tried adding auth value as parameter or added to header, but none of it work. 我在POSTMAN上进行测试,但是我发现在应用规则后无法修补数据,我尝试将auth值添加为参数或添加到标头中,但均不起作用。 在此处输入图片说明

Firebase keep return me "error": "Could not parse auth token." Firebase不断向我返回"error": "Could not parse auth token." or "error": "Permission denied" , can anyone share the right way to access firebase with authentication way?? "error": "Permission denied" ,任何人都可以通过身份验证方法共享访问Firebase的正确方法吗?

It looks like the you're not authentication when calling Firebase from Postman. 从Postman调用Firebase时,您似乎没有身份验证。 Have a look at the Firebase documentation on authenticating for a REST request: reference docs for auth REST API , database docs for authenticating REST calls 看看有关REST请求身份验证的Firebase文档: 身份验证REST API的参考文档,身份 验证REST调用的数据库文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM