/CommonFirebaseJSON

Compilation of the common security rules for Firebase that are often used by people in their projects.

MIT LicenseMIT

Common Firebase JSON Structures

1 ipwpqqrhz0lkd_5setxqcq jpeg

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)

github-logo

Contribute to this repository, if you happen to have any new JSON structure

  1. Fork this repository.
  2. Add new JSON structure with small explanation in SecurityRules.json
  3. Don't forget to edit ReadMe.md with your new JSON structure
  4. Create a new pull request -> Submit the pull request
  5. Also do add your profile name and link in the contributors' list

Current Contributors