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

  Рет қаралды 5,468

Sam Fromaway

Sam Fromaway

Күн бұрын

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

Пікірлер: 22
@niklasport5100
@niklasport5100 3 жыл бұрын
This series enabled me to confidently work through my hardest webdev project yet (reddit clone). Went from being super intimidated by firebase 3 weeks ago to being not intimidated at all (tho still not even close to an expert)! Thanks so much!
@SamFromaway
@SamFromaway 3 жыл бұрын
That's great! I'm glad the video helped.
@hahahehehaha8258
@hahahehehaha8258 Жыл бұрын
your video is better than the Firebase official tutorial lol
@wawayltd
@wawayltd 10 ай бұрын
Thanks for the Tool! You are amazing!
@hocineguebbas4016
@hocineguebbas4016 Жыл бұрын
The best ever, thank you man
@Richard.halabi
@Richard.halabi Жыл бұрын
awesome thing.
@galex23032
@galex23032 3 жыл бұрын
excellent tool! I think though it is unavoidable to know how to write the code. But great job!
@alisalih97
@alisalih97 Жыл бұрын
How to validate data typse of an object that is inside of an array in firestore?
@galex23032
@galex23032 3 жыл бұрын
Great Series!!
@dominatingtrend5872
@dominatingtrend5872 Жыл бұрын
thanks for the tutorial but how can we validate if a collection has sub collection inside a document
@leelonghui
@leelonghui 3 жыл бұрын
May I know how to validate a user upon logging in? If he/she didn't sign up, then we pop a message ask him/her to log in?
@fikilekentane6982
@fikilekentane6982 3 ай бұрын
🙏🏾👌🏾👌🏾👌🏾
@Just_JasonZA
@Just_JasonZA 3 жыл бұрын
love this tool but when copied and pasted to firebase it just throws errors one after the other so I will try it your way and see if I can run it in turminal
@SamFromaway
@SamFromaway 3 жыл бұрын
Glad you like it. You can't just copy paste it you have to check the nesting and.put it in the right order.
@janiswolf
@janiswolf 2 жыл бұрын
awesome 🔥 i watched the whole playlist haha. 1 question: is there a good reason to not use real time updates?
@SamFromaway
@SamFromaway 2 жыл бұрын
Firebase (and my opinion as well) is; There is no real reason. There might be some applications where a real time update is not practical, but more because of a UX perspective than anything else
@janiswolf
@janiswolf 2 жыл бұрын
that makes sense! thanks 🔥
@barnamam
@barnamam 4 жыл бұрын
Thank you for the video and please let us know what is difference between, request.resource.data.title with resource.data.title?
@SamFromaway
@SamFromaway 3 жыл бұрын
request.resource.data.title is the incoming data and resource.data.title is the data already in the database
@thechrisgate
@thechrisgate 4 жыл бұрын
I will i can find your twitter handle but i want to tweet about this tool.
@SamFromaway
@SamFromaway 3 жыл бұрын
Thanks, my Twitter is twitter.com/SFromaway
React With Firebase/Firestore | CRUD and Queries | Version 9
14:27
Sam Fromaway
Рет қаралды 23 М.
Security Rules deep dive
12:09
Firebase
Рет қаралды 17 М.
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 134 МЛН
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 7 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 11 МЛН
Firestore Security Rules - How to Hack a Firebase App
10:05
Fireship
Рет қаралды 130 М.
Firebase Firestore | Security Rules
23:14
Mafia Codes
Рет қаралды 17 М.
100 Firebase Tips, Tricks, and Screw-ups
24:31
Fireship
Рет қаралды 187 М.
Firestore Data Modeling - Five Cool Techniques
11:44
Fireship
Рет қаралды 255 М.
Security Rules! 🔑 | Get to know Cloud Firestore #6
22:39
Firebase
Рет қаралды 272 М.
Intermediate topics in Firebase Security Rules - Firecasts
29:37
Understanding Firestore Security Rules with Examples
18:33
Joshua Morony
Рет қаралды 42 М.
Cloud Firestore Data Modeling (Google I/O'19)
40:37
Firebase
Рет қаралды 173 М.
Getting a Job in 8 Months as a Self Taught Programmer
12:10
Sam Fromaway
Рет қаралды 4,5 М.
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 134 МЛН