oauth2
oauth2 copied to clipboard
oauth2/google/default.go doesn't respect the CLOUDSDK_CONFIG environment variable
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.
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