feat: add the CODER_OAUTH2_PROVIDER_ENABLE deployment flag (#29248)

First of five PRs for PLAT-492, adding the opt-in CODER_OAUTH2_PROVIDER_ENABLE flag for the OAuth 2.1 provider. It defaults to false and is not enforced yet, so there is no behavior change.

Adds the CLI/env/YAML flag and exposes oauth2_provider in build info.
Enables it by default in tests to prepare for route gating.
Updates tests, golden files, and frontend fixtures.
Follow-ups will gate routes/UI, retire the experiment, add startup logging, and update docs.
This commit is contained in:
Bobby Ho authored and GitHub committed 2026-09-14 08:31:26 -07:00
1 parent 2389af0932
commit 1cc73bc43f
16 files changed
+175 -6

No files matched your search

+3
View File
@@ -1861,6 +1861,9 @@ func DeploymentValues(t testing.TB, mut ...func(*codersdk.DeploymentValues)) *co
opts := cfg.Options()
err := opts.SetDefaults()
require.NoError(t, err)
// The OAuth2 provider is off by default in production. Tests turn it on
// so OAuth2 routes are reachable without extra setup.
cfg.OAuth2.Provider.Enable = true
for _, fn := range mut {
fn(cfg)
}