Firestore Security Rules with Testing

preview_player
Показать описание

---

In this tutorial we cover firestore security rules, how to test them locally on your machine and deploy to production.

Рекомендации по теме
Комментарии
Автор

This is much better than the official docs. I had no idea you could write a function in the security rules.

nazxuul
Автор

Thanks @FilledStacks!! Awesome as always!

If anybody else faces issues with the first "General Safety Rule" not passing because of the following error: "TypeError: this.cleanupTimer.unref is not a function", I was able to fix it by adding a jest-environment docblock at the top of the collections.spec.js file in order to use another test environment like so:

/**
* @jest-environment node
*/

jonathanrhein
Автор

Thanks u so much for sharing your knowledge

sebastianloric
Автор

Such an important part of firebase, but coverage is so little and rules are so confusing.

basdfgwe
Автор

Oh my, Lovely. Just when i was struggling with something on this! Shall check the video in some time, dropped a like :D

colourhairskullyrics
Автор

Great tutorial as always, i loved the way you structure the application anyway! 😀
Can you create a validation tutorial for this series, especially with the provider architecture? i think that's a good idea to put those into this series !
Thanks, and keep it up !

huslukestilenethosli
Автор

Really great video! Can you do a video on the way you structure your files? It would be awesome! I have read about MVVM and BLOC but I can't really understand how to implement it. I think a video about how you do would really help as you are really good at explaining. Or if you have some knowledge about where to learn more about it! Thanks and keep it up! :D

CODMWViktor
Автор

I have given this video 100th like :-)

akashmaurya
Автор

Great video! How would you go about writing a rule to allow new users to create a document in the users collection? I tried allowing create request.auth == null, but that didn't work when I also want to require certain fields for the creation?

diegozablah
Автор

Can you add a link to the "first episode" in which you created the project for the viewers new to your channel?

gyenabubakar
Автор

Probably the toughest video of the series.

mohammadmujahid
Автор

Hi, thank you for sharing your experience and knowledge. I need your help. I'm facing an error i.e "FirebaseError: "projectid" not provided in Firebase.initializeApp

Will you please help me

pratikekghare
Автор

How do you handle mocking your data if you need to create a sub-collection within a document?

TestingQuebec
Автор

How can we make sure that the application doesn't load data from firestore every time it starts ? Only fetch when some changes is done in the database.

rahulagarwal
Автор

Hi, I'm watching for the first time and right now I am paying attention to your getUserData() function ... At 20:57, I can see that the id field of the document is also the id of the document in the user collection ... I have been unsuccessful coding get(/database/) calls from within Firestore security rules to date (and haven't known why), so my question is, is the copying of the document's id (as shown) the only way to achieve get(/database/) calls successfully please? Many thanks for sharing your example.

mmathems
Автор

Can I write a rules to expire a document after amount of time?

bongbox