Setting firestore security rules without using Firebase Authentication

三世轮回 提交于 2019-12-10 18:09:59

问题


I have an angular web application and I am not using Firebase Authentication, for logging in my users, as it's done via a service.

Right now, my firestore account has full access, anyone can perform any operation.

I read the documentation of security rules and everywhere it mentioned firebase auth. Is there a way to define rules, without using firebase auth?


回答1:


You can certainly use security rules without Firebase Auth, but you won't be able to write any rules that depend on identifying the individual user. To put it more specifically, you will not be able to use the auth variable effectively at all, since it's only populated with data from Firebase Auth.

Without auth information, all you'll be able to do is check the contents of documents to be created or modified. Yout won't be able to defined secure per-user rules.



来源:https://stackoverflow.com/questions/54083375/setting-firestore-security-rules-without-using-firebase-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!