Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ZandA's avatar
Level 1

Firebase Firestore update database docs with rules auth

I use vue js with firebase firestore database, I've changed my database rules to allow read: if true; allow write: if request.auth != null; how to config this auth in my project? anyone could help me pls? I could not find the docs about this rules and auth configuration

import { initializeApp } from "firebase/app";
import { getFirestore, onSnapshot, doc, updateDoc } from "firebase/firestore";
.......................................................
let docRef = doc(db, appConfig, appConfig.id);
...................................................
updateDoc(docRef, dataToUpdate).then(() => {
        toast.add({
            severity: "success",
            summary: "Successful",
            detail: `Data saved successfully`,
            life: 3000,
        });
        emit("onSuccess");
    })

it works fine with rules: allow write: if true, I wanna understand this rules and auth, pls.

0 likes
0 replies

Please or to participate in this conversation.