Using the email&password auth Firebase Auth function for login.
After login I use an http POST to create custom-named documents which requires some OAuth authentication. (“Expected OAuth 2 access token”)
Requires one of the following OAuth scopes:
Where do I get the access token? Authorization: Bearer [YOUR_ACCESS_TOKEN]
Insane, I do use the right http request url
But I can’t figure out where the hell I find [YOUR_ACCESS_TOKEN]
It is not the client ID either so where is that “access token”??
Sharing the solution I found after a full day of research:
The right documentation is here: Use the Cloud Firestore REST API | Firebase
Install the Get ID Token (Firebase auth) function, run it before your http request, pass its output (the ID Token) to the headers of the http request: