Firebase身份验证uid不解释实际值

Firebase身份验证uid不解释实际值,firebase,firebase-realtime-database,firebase-authentication,Firebase,Firebase Realtime Database,Firebase Authentication,我也看到了类似的问题, 但是,我的略有不同,我尝试将值与auth.uid进行比较,而不是比较路径中的键。 根据我的测试,它看起来像一个bug,我试图用Firebase记录它,但是Andres回答说比较数据值不是使用规则的方法 数据用键“id”存储,该键的值为455,如果我在规则中硬编码455,它就可以正常工作。如果我引用“äuth.id”,它将失败。我可以告诉您auth.id失败,因为如果我使用其他函数(如hasChild('auth.id')进行测试,它可以正常工作,我现在使用它作为解决方法。

我也看到了类似的问题, 但是,我的略有不同,我尝试将值与auth.uid进行比较,而不是比较路径中的键。 根据我的测试,它看起来像一个bug,我试图用Firebase记录它,但是Andres回答说比较数据值不是使用规则的方法

数据用键“id”存储,该键的值为455,如果我在规则中硬编码455,它就可以正常工作。如果我引用“äuth.id”,它将失败。我可以告诉您auth.id失败,因为如果我使用其他函数(如hasChild('auth.id')进行测试,它可以正常工作,我现在使用它作为解决方法。这是在具有规则v2的实时数据库上进行的

在所有测试中,我都在尝试进行读取/测试

数据:

身份验证令牌:

{
   "provider": "anonymous",
   "uid": "455"
}
本应通过的失败规则:

read: "data.child('id').val()==auth.id"
硬编码的规则:

read: "data.child('id').val()==455"
用于指示auth.id中的值正确的规则

read: "data.child('id').val==455 && root.child('test').hasChild(auth.uid)"
read:  root.child('test').hasChild(auth.uid)"
read: "data.child('id').val==455 && root.child('test').hasChild(auth.uid)"
read:  root.child('test').hasChild(auth.uid)"