Is it possible only read,write if user authenticated in firebase?
Asked
Active
Viewed 1,032 times
0

Frank van Puffelen
- 565,676
- 79
- 828
- 807

Metehan Kasap
- 25
- 1
- 5
-
1Does this answer your question? [Firebase Permission Denied](https://stackoverflow.com/questions/37403747/firebase-permission-denied). I also recommend checking out https://stackoverflow.com/questions/67408642/what-do-these-default-security-rules-for-the-firebase-realtime-database-mean – Frank van Puffelen Dec 26 '21 at 14:56
-
Welcome to SO :-) when you need to refer to code in a question, please paste it in as text instead of using a screenshot - thanks – Martin CR Dec 27 '21 at 13:38
1 Answers
3
Yes of course. First, select Firestore Database in the Firebase console, then select the Rules tab above.
and delete all the codes, paste the following codes there. Then publish it.
Here Cloud Firestore example:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write : if request.auth!=null;
}
}
}
You can also use this code for Firebase Storage. Here for more info: Firebase Security Rules

Ferhat Ismayilov
- 255
- 3
- 16