如何使用规则禁止使用Firebase实时数据库中的用户?
我在实时数据库中创建了一个被禁止的用户列表,我想让他们无法登录,我知道我可以使用数据库规则,但是我不知道该如何帮助我?
这是我的数据库结构:
/banned-users:
/UserId1:True
/UserId2:True
这些是我的数据库规则:
{
"rules": {
".read": true,
".write": true
}
}
I've created a list of banned users in my realtime Database and I want to make them impossible to log-in, I know I can use the database rules, but I don't know how, can someone help me?
This is my database structure:
/banned-users:
/UserId1:True
/UserId2:True
Those are my database rules:
{
"rules": {
".read": true,
".write": true
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要
”实际上,您不会“使它们无法登录”,因为这是不可能的,但是您可以防止它们从数据库写入/阅读。
You need to reference data in other paths as follows:
Note that actually you don't "make them impossible to log-in", because this is not possible, but you prevent them writing to/reading from your database.