Search code examples
firebase-realtime-databasefirebase-security

Realtime Database - How can I use the md5 hashing inside the Rules?


{
  "rules": {    
    "users": {
      "$uid": {        
        "$experiment_id": {
            ".read": "data.child('sharedEmails').child(hashing.md5(auth.email)).val() === true",
            ".write": "auth != null && auth.uid == $uid"
        }
      }
    }
  }
}

enter image description here


Solution

  • You're confusing the Firebase RTDB rules and Firestore rules - only Firestore has hashing..