-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Google Maps Places Client] - Add the ability to impersonate a service account #5892
Comments
I was able to resolve this by manually setting the scopes in the Places Client.
It would appear that the Google Map Places Client doesn't set any auth scopes by default: places_client.js:263
I would suggest at least adding in the default scope of 'https://www.googleapis.com/auth/cloud-platform'. |
Got it! To clarify, is this the resolution to googleapis/google-auth-library-nodejs#1915? Thanks for submitting this and for posting and finding the answer. I didn't know this before but I think this can and should be generated, but it's not currently being done so. I'll submit a ticket internally to fix it. Internal f/u: cl/718235810 |
Hi Sofisl, Yes the auth scope is the fix for the other mentioned issue. I don't recall opening two issues for this but I also don't recall what I did last week so.... my memory isn't always great 😃 |
Fixed by #5990 |
A screenshot that you have tested with "Try this API".
What would you like to see in the library?
When using the PlacesClient with Application Default Credentials the client works fine.
When you setup ADC with Service Account Impersonation then the client error's out with a
Getting metadata from plugin failed with error: INVALID_ARGUMENT: unable to impersonate: Request contains an invalid argument.
error.I'm assuming that the client is setup to utilize the impersonation credentials properly from the ~/.conifg/gcloud/application_default_credentials.json file. The structure is different depending on if using your own Google account vs impersonating a service account.
Describe alternatives you've considered
I've tried overriding the Place Client client options with an Auth client that uses an API Key. I wasn't able to get the API Key approach to work either.
Additional context/notes
No response
The text was updated successfully, but these errors were encountered: