Firestore Security Rules Pro Tips (Save 90% Time) | Advanced Firebase/Firestore

Firestore Security Rules Pro Tips (Save 90% Time) | Advanced Firebase/Firestore

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.

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

Tool: https://code-snippet-generator1.netlify.app/ Contribute To The Tool: https://github.com/samfromaway/code-generator01

Github Repo With Code: https://github.com/samfromaway/firebase-tutorial Documentation: https://firebase.google.com/docs/firestore

COMMAND: firebase deploy --only firestore:rules

firebase security

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

What is firebase,firebase bangla tutorial.

LIKE | COMMENT | SHARE | SUBSCRIBE The Firebase Realtime Database is a cloud-hosted NoSQL database that lets you store and sync data between your users in re...

Best Custom Web & Mobile App Development Company

Top Web & Mobile Application Development Company in India & USA. We specialize in Golang, Ruby on Rails, Symfony, Laravel PHP, Python, Angular, Mobile Apps, Blockchain, & Chatbots

Firebase Introduction with C#

LIKE | COMMENT | SHARE | SUBSCRIBE Firebase is a mobile and web application development platform developed by Firebase, Inc. in 2011, then acquired by Google...

Create database into firebase

LIKE | COMMENT | SHARE | SUBSCRIBE In this video, I will show you how to Create database into #firebase console. Subscribe & Stay Connected! Thank You! ♥ #Fi...

Save Employee into firebase

LIKE | COMMENT | SHARE | SUBSCRIBE In this video, I will show you how to save employee information into firebase database. Subscribe & Stay Connected! Thank ...