There are tons of operations that can be made into your firebase database using JSON rules, you can potentially control what your user can change, do or access from your database.
Compilation of the common security rules for Firebase that are often used by people in their projects.
There are numerous rules people use in their projects, this is collection of those which have been used in my projects or in some other.
Currently there are JSON codes for following kind of behavior:
No security
Full security
Only Authenticated users can write
Users can only access their own data
Validates user is moderator from different database location
Validates string datatype and length range
Checks presense of child attributes
Validates timestamp is not a future value
Prevents Delete or Update
Prevents only Delete
Prevents only Update
Prevents Create and Delete
Allows update but no push (no new child created)
- Fork this repository.
- Add new JSON structure with small explanation in SecurityRules.json
- Don't forget to edit ReadMe.md with your new JSON structure
- Create a new pull request -> Submit the pull request
- Also do add your profile name and link in the contributors' list