Рет қаралды 5,468
Tool: code-snippet-g...
Contribute To The Tool: github.com/sam...
Github Repo With Code: github.com/sam...
Documentation: firebase.googl...
Last Video: • Firestore Security Rul...
Full Firebase Playlist: • Firebase
Full React Firebase Playlist: • React & Firebase
COMMAND:
firebase deploy --only firestore:rules
Today we are going to learn how to implement firebase security rules for your real-world application. As you already know Firestore is a No-SQL database. I personally really like the flexibility that comes with that but on the other hand, everybody can technically write any kind of data with any kind of key-value pair. Of course our client app, in this case, our react application, has only a limited number of fields. But we know that clientside data can’t be trusted. And with some small tricks technically any hacker can write to your database with whatever he or she wants.
This is our school directory and we want to secure it this way:
- Everybody can read data
- Only logged in users can write so create, update, and delete data.
- The types must be correct.
- Only the owner of the respective data can update and delete the data.
- A document is just allowed to have the predefined keys.
- All keys are required to be in a document, only the description is optional.
- The score can only be between 0 and 10.
- Updates can only be done all 5s to reduce spamming
CONTACT:
📱 Facebook - / devworldinfo
🌎 Website - www.dev-world....
📧 Email - contact@dev-world.info
ABOUT THIS CHANNEL:
Dev World is a mix of tutorials and educational videos around Coding, Online Marketing, and Design.
#Coding #Webdesign #Marketing