Has anyone managed to post something in Firestore with this rule in place (allow read, write: if request.auth != null; )?

Um getting access denied,it has been a month now trying to get it working.

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
       allow read, write: if request.auth != null;

Thanks in advance

As of experience from Your other posts I am pretty sure that an authentication header is missing or miscondigured in the REST API setup. (I am 99% sure that You do not use the Firebase Connector.)

Try adding a header with the name “auth” amd a value ehich is dynamic.

Then when You do the request before that do a “Get Firebase Token” flow (can be found on the marketplace) and add that output to Your auth header value.

Hope this fixes Your issue.

It might work, I’ve never used hearders before coz I didn’t understand what they did… I’ll use them and update you on how it went…

Without proper headers-utilization, You will face a lot of issues with any API… I am a little bit confused about how could You avoid them so far during Your career, but let’s hope that You’ll get Your head around them pretty quickly. :pray:

I thought the get firebase token was for fcm messages. That is how I have been using it and it has been working to send fcm messages via cloud finctions :thinking::thinking::thinking:

Indeed the logic flow I tried to refer to is the “Get ID token”, sorry. And thanks for pointing this out Daniel.

Um new to appgyver, Atleast 3 months in. I’ve used firebase in Android studio and I didn’t have hearders to work with because the firebase sdk handled it, so when I got here, there were headers and I didn’t know what they did. I wanna add some security to the app, that’s why um asking about Ths.
I have firebase connector but I didn’t use it because of the custom ID problem…

I really appreciate the help