Flutter - Firebase Cloud Firestore, database, storage rules permission test ( allow only auth user )

preview_player
Показать описание
Please comment on any questions! If this movie helped you, please subscribe to my Youtube Channel, please :) 🙋🏻‍♂️

* Cloud FireStore rules example

- Only Authentication user can access

rules_version = '2';
match /databases/{database}/documents {
match /{document=**} {
}
}
}

- Allow all users

rules_version = '2';
match /databases/{database}/documents {
match /{document=**} {
allow read;
allow write;
}
}
}

- Block all users

rules_version = '2';
match /databases/{database}/documents {
match /{document=**} {
allow read: if false;
allow write: if false;
}
}
}

* Storage rules example

- Only Authentication user can access

rules_version = '2';
match /b/{bucket}/o {
match /{allPaths=**} {
}
}
}

- Allow all users

rules_version = '2';
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write;
}
}
}

- Block all users

rules_version = '2';
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if false;
}
}
}

* Develop environment.

- Flutter SDK Version: 1.12.13+hotfix.9
- Flutter: 45.1.1
- Dart: 192.7761
- Xcode Version: 11.4.1
- Android Studio: 3.6.2
- OS Version: MacOS Catalina 10.15.4

Thank you for watching :)

#Flutter, #MobileApp, #FirebaseRule
Рекомендации по теме
Комментарии
Автор

Brillant Video! Thanks for the amazing information.

AmazinglyStrangeMedia
Автор

Hy brother how can we show quotes when internet is I'm fetching quotes from firebase but i want to store in phone... etc.. and when internet isn't available it will show stored quotes..
Do you have any tutorial or suggest me any videos Please 😇😇😇

dev.faizan
Автор

you did not include the tuttorial for the realtime database

saintdmixonlinetutorials
Автор

I am facing issue related to write permission

W/Firestore( 6678): (24.10.2) [WriteStream]: (e369830) Stream closed with status: Status{code=PERMISSION_DENIED, description=Permission denied on resource project 1:688360665265:android:a76df499c29b711251f290., cause=null}.

altobputhethu