Closed asidorochev closed 3 years ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Unfortunately that's by design. The documentation mentions this:
When used, the WithHTTPClient option takes precedent over all other supplied options.
If you think this behavior should change I'd advise filing an issue at https://github.com/googleapis/google-api-go-client
The only other alternative is to initialize an oauth2.Transport
instance with the right credentials, and pass that into your http.Client
. See the examples in https://github.com/firebase/firebase-admin-go/issues/397#issuecomment-676856380
Environments
The problem
Steps to reproduce:
If I use only WithCredentialsJSON option to create Firebase App, it works with no problem. But if I use both WithCredentialsJSON and WithHTTPClient options, I got error while sending message: "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project."
Working code:
Not working code: