Google’s Node Auth Library: Set HTTPS_PROXY for Token Requests
Set the documented proxy environment for token requests without replacing the application's Google authentication flow.
HTTPS_PROXY=http://proxy.example.net:8080 node app.jsIn a POSIX shell, this starts app.js with the proxy route available to Google's Node authentication library. The library documents HTTPS_PROXY and https_proxy for HTTPS requests that have no explicit proxy configuration.
Keep the existing GoogleAuth, JWT or other supported authentication flow. A proxy requirement does not call for reimplementing assertion signing or the token exchange.
The variable's name selects HTTPS destinations; the value's http:// scheme describes the intermediary. For a public HTTP route, the HTTP proxy list provides candidates for that environment value. If the authentication flow obtains a token over HTTPS, that request needs this route before the later API call can begin.
Distinguish an OAuth response from a connection failure. An authorization-server rejection may have arrived successfully through the proxy. Preserve its details and investigate the assertion or account configuration rather than changing proxy addresses.