Make keyfilename authentication more consistent with other Node libraries
See original GitHub issueThis issue is related to our work in client extensible options.
Other Node libraries are able to authenticate using just a keyfileName in the constructor of the client. However, it is required to add a project_id variable in the constructor to authenticate, like so:
new BigQuery({
keyFilename: //keyfile
projectId:
process.env.GOOGLE_CLOUD_PROJECT
});
In order to be more consistent across libraries/requirements, it would be nice if we could get the project id from the keyfile itself, without having to declare it separately.
I think this work might be similar to this PR: https://github.com/googleapis/nodejs-pubsub/pull/731
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Node.js google cloud storage authentication using credentials ...
js GCS api docs on how to do so. They instruct to generate and download a json file that contains your private key...
Read more >Authenticating with a service account key file | BigQuery
Manually create and obtain service account credentials to use BigQuery when an application is deployed on premises or to other public clouds.
Read more >Google APIs Node.js Client
Node.js client library for using Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT tokens is ...
Read more >Handling dependencies | Cloud Functions for Firebase - Google
Private modules from other repositories. The npm documentation explains how to create custom read-only access tokens. We discourage using the .npmrc file ...
Read more >How to migrate a Node.js app from ADAL to MSAL
How to update your existing Node.js application to use the Microsoft Authentication Library (MSAL) for authentication and authorization ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@stephenplusplus @sofisl what’s weird, is I think you were noticing the project is appropriately detected in our auto generated libraries? which share the auth library.
@sofisl when we eventually dig into this, we might want to use npm link to test bigquery and the auth library at the same time.
Closing in lieu of #1084 in google-auth-library-nodejs.