nodejs-bigquery
nodejs-bigquery copied to clipboard
BigQuery constructor options interface doesn't accept the `refresh_token` field
Thanks for stopping by to let us know something could be better!
-
Is this a client library issue or a product issue? This is an issue with this library
-
Did someone already solve this? None of the existing issues or stackoverflow questions are applicable to this.
-
Do you have a support contract? I don't have a support contract at the moment.
Environment details
- OS: Linux
- Node.js version: v16.13.2
- npm version: 8.1.2
-
@google-cloud/bigquery
version: 5.5.0
Steps to reproduce
- Look at
BigQueryOptions.credentials
field, it doesn't support arefresh_token
although the code (https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/credentials.ts#L77 and https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/refreshclient.ts#L106) suggests it's required and in fact I've confirm it's valid to provide it when trying to perform an OAuth based authentication with my local application code
My suggestion is the following modification to the interface definition in https://github.com/googleapis/google-auth-library-nodejs
diff --git a/src/auth/baseexternalclient.ts b/src/auth/baseexternalclient.ts
index db10856..808ec2f 100644
--- a/src/auth/baseexternalclient.ts
+++ b/src/auth/baseexternalclient.ts
@@ -78,6 +78,7 @@ export interface BaseExternalAccountClientOptions {
token_info_url?: string;
client_id?: string;
client_secret?: string;
+ refresh_token?: string
quota_project_id?: string;
workforce_pool_user_project?: string;
}
However since the change needs to be made in https://github.com/googleapis/google-auth-library-nodejs, but the issue is affecting this library, should I made an issue on https://github.com/googleapis/google-auth-library-nodejs as well?