问题
I have very simple write security rule that should only allow users with verified email to write data,
"someNode": {
".write": "auth.token.emailVerified === true"
}
For some reason I am still getting permission denied in simulator with specific users token and in my app with same user. I double checked user object in client and it indeed has emailVerified === true
hence I am not sure to why this is not working.
Screenshot:
回答1:
Turns out auth.token.emailVerified
should be auth.token.email_verified
its a bit inconsistent with how such data is presented on client side.
来源:https://stackoverflow.com/questions/42470120/security-rule-to-only-allow-write-for-users-with-verified-emails