Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
FirebaseError: Missing or insufficient permissions. for update or create

Here is my security rule in my Firebase db:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /links/{linkId} {
      allow update, create: if request.auth.uid;
    }
  }
}

Here is my JS using version 9 of Firebase:

const db = getFirestore()
await addDoc(collection(db, "links"), {
    title: 'my link title'
})

I'm 100% certain that I am currently signed in. Just before my addDoc code, this is correctly logging the current user's uid:

const { getAuth } = await import('firebase/auth');
console.log(getAuth().currentUser.uid)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Change your security rule to:

allow update, create: if request.auth.uid != null;
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!