Firestore Security Rules Setup | Advanced Firebase/Firestore

Firestore Security Rules Setup | Advanced Firebase/Firestore

Firestore Security Rules Setup | Advanced Firebase/Firestore. Today we are going to look at how to keep your database safe with cloud Firestore security rules.

Today we are going to look at how to keep your database safe with cloud Firestore security rules.

Firestore rules are basically your last defense for your database. We can write rules to protect our database from data we don’t want. So, what does that includes?

With Firestore we don’t have to sanitize our data, this is done by Firestore itself, but we most probably want to validate it. and that’s what we can do with these rules. We can also use information from authentication but more about that in the video.

We have two main possibilities to check data. Request.resource.data, which is the incoming data And resource.data which is the existing data.

So if we want to check data that a user wants to add to the database, we check the Request.resource.data and if we want to check something about the data that’s already in the database. We check the resource.data object.

The last thing before we start with the tutorial is that we write the Firestore rules with a custom Firestore rules language that resembles Javascript.

To show you how the Firestore rules work I’ll use my firebase react tutorial. If you haven’t seen it and if you are just interested in learning how the Firestore rules work, don’t worry you will still be able to follow the video if you have a basic understanding of Javascript and Firestore.

Furthermore, this tutorial applies not just to react but everything regarding Javascript. So if you use another javascript framework or vanilla Javascript, this tutorial still applies to you.

So let’s get started with writing our rules, we can either write the rules directly here in the, but it’s recommended to set up a firebase project in your development environment...

Github Repo With Code: https://github.com/samfromaway/firebase-tutorial Documentation: https://firebase.google.com/docs/firestore Tool: https://code-snippet-generator1.netlify.app/

COMMANDS: npm install -g firebase-tools firebase login firebase init

firebase deploy --only firestore:rules

  • 0:00 Introduction
  • 1:35 Setup
  • 4:47 Deploy Rules
  • 7:56 Example 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 ...