tobythomassen
tobythomassen

Reputation: 147

Firestore REST authentication

I am trying to use firestore with c#, but the only libraries that allow that are in prerelease and require authentication through an environment variable. So after reading the docs I started looking at the REST API. My issue is that because of the application I cant set the rules to open, I need some form of authentificaion. I was wondering if I could do something like this

https://firestore.googleapis.com/v1beta1/projects/YOUR_PROJECT_ID/databases/(default)/documents/cities/LA?auth=MY_AUTH_KEY

Upvotes: 3

Views: 4037

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317928

The documentation for the Firestore REST API describes what you need to do to authenticate with a Firebase Auth token:

After you obtain either a Firebase ID token or a Google Identity OAuth 2.0 token, pass it to the Cloud Firestore endpoints as an Authorization header set to Bearer {YOUR_TOKEN}.

Upvotes: 5

Related Questions