fix: added conditional so default is not always set and env vars are honored #3303 (#3304)
Signed-off-by: Drew Foehn <drew@pixelburn.net>
commit3c37312f3cadb9d365a1ad9e34a57b6220f43a2e
authorDrew Foehn <pixeldrew@users.noreply.github.com>
dateWed 14 Jan 2026, 16:18 (9 months ago)
parenta8e2084
CHANGELOG.md+1
@@ -10,6 +10,7 @@
1010
1111- [#3197](https://github.com/oauth2-proxy/oauth2-proxy/pull/3197) fix: NewRemoteKeySet is not using DefaultHTTPClient (@rsrdesarrollo / @tuunit)
1212- [#3292](https://github.com/oauth2-proxy/oauth2-proxy/pull/3292) chore(deps): upgrade gomod and bump to golang v1.25.5 (@tuunit)
13+- [#3304](https://github.com/oauth2-proxy/oauth2-proxy/pull/3304) fix: added conditional so default is not always set and env vars are honored fixes 3303 (@pixeldrew)
1314
1415# V7.13.0
1516
pkg/apis/options/providers.go+3−1
@@ -416,7 +416,9 @@ func (a *ADFSOptions) EnsureDefaults() {
416416
417417// EnsureDefaults sets any default values for GoogleOptions fields.
418418func (g *GoogleOptions) EnsureDefaults() {
419− g.UseOrganizationID = ptr.To(DefaultGoogleUseOrganizationID)
419+ if g.UseOrganizationID == nil {
420+ g.UseOrganizationID = ptr.To(DefaultGoogleUseOrganizationID)
421+ }
420422
421423 if g.UseApplicationDefaultCredentials == nil {
422424 g.UseApplicationDefaultCredentials = ptr.To(DefaultUseApplicationDefaultCredentials)