5,579
questions
0
votes
0
answers
33
views
Changing Firebase Rules to be more restrictive
My existing Firebase realtime database currently uses the below rules and it works great for a single user:
{
"rules": {
".read": "auth != null",
".write&...
0
votes
1
answer
28
views
Can I enforce required fields in firestore documents through a javascript class?
I'm aware that I can use firebase security rules to enforce required fields in documents. However, rather than writing the security rules, I'd like to just write a class and ensure that my document ...
0
votes
1
answer
43
views
Missing or insufficient permissions when testing existence of doc before creating with js modular web sdk
Using the Web modular API (firebase js sdk 11.0.1 as well as previous version), when I call setDoc after testing existence, I get:
Missing or insufficient permissions
export async function ...
0
votes
1
answer
41
views
Why am i getting all documents when I should get none?
In firestore I have a collection called wallets. A random wallet could look like this
name: "Bank of America"
balance: 4000
currency: "eur"
...
user_id: "...
0
votes
0
answers
23
views
Permission Denied Error When Accessing Firestore in Secondary Firebase Project in Flutter
I have a Flutter app that is set up with two Firebase projects:
Project A (default): Used for authentication (OAuth) and Firebase Cloud Messaging (FCM).
Project B (secondary): Used for storing ...
0
votes
1
answer
27
views
Firestore security listing on sub collection
I have a collection of organizations /organizations and a collection of users /users. The organizations collection has a subgroup of groups /organizations/org1/groups.
Currently I have a security rule ...
2
votes
2
answers
35
views
How to update the rules of multiple RTDB instances using the firebase tools?
I would like to run firebase deploy --only database and it deploys the Firebase Real time database rules for each of my databases instances.
I would like the config of firebase.json / .firebaserc and ...
0
votes
1
answer
37
views
Firebase Realtime Database Secure Rules for a Static Website
I have a personal website based on GitHub pages. Some of its pages need to read data from a Firebase realtime database I created on my own and display the data through HTML.
For the secure rules of ...
0
votes
0
answers
31
views
Identify why Cloud Firestore / Firebase Security Rules aren't working
I'm currently in the process of building my first proper app in Flutter and have spent some time setting up an offline-first architecture where data-objects are saved locally in SQLite first and then ...
0
votes
0
answers
49
views
How can I create a Firebase security rules function that limit sizes on nested object?
How can I create a Firebase security rules function to enforce the following size constraints, ensuring compliance with minimum requirements as well?
The root-level data object should have at most 2 ...
0
votes
1
answer
82
views
How to write query for roles defined as Map object in angular and firestore?
I am using @angular/fire and I have a temples collection with below schema:
{
name: 'Sri Chamundeshwari temple',
address: 'Chamundi hills, Mysore',
roles: {
'[email protected]': 'owner',
'admin@...
0
votes
0
answers
28
views
: Firebase Cloud Firestore Security Rules Preventing Data Access
I'm currently facing an issue with my Firebase Cloud Firestore setup. I have a project called "OrderFood," and I’m trying to read data from my Firestore database. However, I keep receiving ...
0
votes
0
answers
17
views
Firebase security rules: some string fields not accessible with resource.data
I want to set up my security rules and want to make certain collections only accessible to the document owner. For that I want to access e.g. for the projects collection the field projectOwner with ...
0
votes
1
answer
48
views
How can I prevent certain HTML tags from being stored to Firestore with firestore.rules? [closed]
Something like this?
service cloud.firestore {
match /databases/{database}/documents {
function isClaims(claim) {
return get(/databases/$(database)/documents/users/$(request.auth.uid))....
0
votes
2
answers
64
views
Firestore rule for single document
I have a Firestore database with the following rule:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if ...