feat: add OAuth2 provider functionality as an experiment (#18692)

# Add OAuth2 Provider Functionality as an Experiment

This PR adds a new experiment flag `oauth2` that enables OAuth2 provider functionality in Coder. When enabled, this experiment allows Coder to act as an OAuth2 provider.

The changes include:
- Added the new `ExperimentOAuth2` constant with appropriate documentation
- Updated the OAuth2 provider middleware to check for the experiment flag
- Modified the error message to indicate that the OAuth2 provider requires enabling the experiment
- Added the new experiment to the known experiments list in the SDK

Previously, OAuth2 provider functionality was only available in development mode. With this change, it can be enabled in production environments by activating the experiment.
This commit is contained in:
Thomas Kosiewski
2025-07-03 19:44:29 +02:00
committed by GitHub
parent 2c95a1dd71
commit 15551541e8
6 changed files with 18 additions and 7 deletions
+1
View File
@@ -3039,6 +3039,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
| `notifications` |
| `workspace-usage` |
| `web-push` |
| `oauth2` |
## codersdk.ExternalAuth