Repository navigation
Consider providing a warning for an invalid keyfile #768
Copy link
Copy link
Closed
Description
Activity
Thanks for the idea, and sorry for the delay in addressing it. Our auth goes through a few layers in many directions depending on the input received (keyfile vs credentials object/JSON key vs p12 key vs pem key, etc...), but after merging googleapis/node-gtoken#3, I think all of the holes are covered. If something is missing from any given auth input type, it should now be reported when something isn't provided before a Google API request is made.
👍
- added a commit that references this issue
on Nov 17, 2022 - added a commit that references this issue
on Jul 23, 2025 - added a commit that references this issue
on Jan 28, 2026 - added a commit that references this issue
on Feb 5, 2026 - added a commit that references this issue
on Feb 17, 2026 - added 2 commits that reference this issue
on Mar 23, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
Metadata
Metadata
Assignees
Labels
No labels
When creating a keyfile for a service account according to GoogleCloudPlatform/gcloud-node#elsewhere, it seems that the
client_emailandclient_idfields are sometimes empty, even though (I think) they are both required to be the email address of the service account. Trying to use that credential with this module and Cloud Datastore or Cloud Storage will return an 'Invalid Grant' error when making requests.This is just a suggestion (feel free to close-out as wont-fix) but it might be worth adding a warning from this module when those fields are missing / empty strings.