-
Notifications
You must be signed in to change notification settings - Fork 388
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
Unable to configure Gaxios options for common AuthClients #1621
Comments
For some reason, the JWT class does this, but OAuth2Client doesn't. I think this also means that if JWT isn't overriding everything and you set gaxios options, behavior will be inconsistent, when calling non-overridden methods. |
Oh never mind; it looks like I had the types for JWT's constructor wrong. It doesn't accept gaxios options. |
Hey @benasher44, Today, we offer a few options for setting
This is a worthwhile feature request, we'll explore this as an option. |
Exposing this as a new option via: Now all AuthClients can accept a Additionally, it can be set for any AuthClient that would be instantiated via: new GoogleAuth({
clientOptions: {
transporterOptions: {} // `GaxiosOptions`
}
}) |
Is your feature request related to a problem? Please describe.
For OAuth2Client for example, there's no way to configure the agent to make use of keep alive.
Describe the solution you'd like
Ideally, the constructor for all AuthClient sub-classes accept options that would be passed to gaxios, which would allow setting the agent
Describe alternatives you've considered
I think one could maybe overwrite the transporter ivar with one that is sub-classes to set an agent, but that feels bad.
Additional context
Nearly all of the API wrappers in https://github.com/googleapis/google-api-nodejs-client use a similar constructor pattern, wherein all of the constructor options are a subset of gaxios options.
The text was updated successfully, but these errors were encountered: