Closed prashanthjbabu closed 2 years ago
I found a few problems with this issue:
Do you have other rules that might be failing before it even gets to the custom claims? See rules are not filters. Here is a similar question on SO https://stackoverflow.com/questions/58447913/firebase-permission-denied
Please use Stack Overflow for usage questions in the future. Thanks!
I have invoked the firebase new app with an authoverride option where i pass a UID which has a custom claim like
role
asadmin
. However this seems to be failing(Permission Denied) at the firebase rules of the realtime database where i have a write condition forauth.token.role === admin
.The objective here is that I'd like the firebase admin sdk to be validated against any firebase rules . Since service accounts are exempted from firebase rules , I thought of using the authoverride option . However even though the UID that I pass as authoverride has the required claims (validated using
GetUser
as well ) . I still see aPermission Denied
.