oauth2 icon indicating copy to clipboard operation
oauth2 copied to clipboard

oauth2/google/default.go doesn't respect the CLOUDSDK_CONFIG environment variable

Open jacklty opened this issue 4 years ago • 1 comments

https://github.com/golang/oauth2/blob/d04028783cf159bebfcd4fa66741a2193e2138a9/google/default.go#L212

CLOUDSDK_CONFIG instructs gcloud to use different location where to keep its configuration as well as the application-default credentials (ADC). Other oauth libraries (e.g. java, python) do respect it and locate the ADC accordingly, however golang/oauth2 only check for the default location ($HOME/.config/gcloud) and doesn't refer to CLOUDSDK_CONFIG.

jacklty avatar Jun 18 '21 11:06 jacklty

Although some other languages oauth2 libraries honor this today it is not in the spec for ACD: https://google.aip.dev/auth/4110. cc @broady

codyoss avatar Jul 22 '21 21:07 codyoss