Join Telegram Channel And Premium Theme Free Download Join Now Content Now

How to Secure Firebase Database in Sketchware Pro | Firebase Security Rules | SketchY

FLEXXI


Codes - 



1. No Security:


{
  "rules": {
    ".read": true,
    ".write": true
  }
}



2. Close server (No access):


{
  "rules": {
    ".read": false,
    ".write": false
  }
}



3. Only Authenticated Users can read & write the data:


{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null"
  }
}

4. Only user can read & write his own data:

{
  "rules": {
    "posts": {
       "$uid": {
         ".read": "$uid === auth.uid",
         ".write": "$uid === auth.uid"
       }
     }
   }
}



5. Only Admins can read & write the data:

{
 "rules":{
   "Users":{
    ".read": true,
    ".write": "root.child('badges/admin/' + auth.uid).exists()"
        }
    }
}



6. Only Particular User can write:

{
 "rules":{
    ".read": true,
    ".write": "auth.uid == 'paste Your UID' "
      }
}



How to Secure Firebase Database in Sketchware Pro | Firebase Security Rules | SketchY

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.