mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: enable GitHub OAuth2 login by default on new deployments (#16662)
Third and final PR to address https://github.com/coder/coder/issues/16230. This PR enables GitHub OAuth2 login by default on new deployments. Combined with https://github.com/coder/coder/pull/16629, this will allow the first admin user to sign up with GitHub rather than email and password. We take care not to enable the default on deployments that would upgrade to a Coder version with this change. To disable the default provider an admin can set the `CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER` env variable to false.
This commit is contained in:
+3
@@ -498,6 +498,9 @@ OAUTH2 / GITHUB OPTIONS:
|
||||
--oauth2-github-client-secret string, $CODER_OAUTH2_GITHUB_CLIENT_SECRET
|
||||
Client secret for Login with GitHub.
|
||||
|
||||
--oauth2-github-default-provider-enable bool, $CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER_ENABLE (default: true)
|
||||
Enable the default GitHub OAuth2 provider managed by Coder.
|
||||
|
||||
--oauth2-github-device-flow bool, $CODER_OAUTH2_GITHUB_DEVICE_FLOW (default: false)
|
||||
Enable device flow for Login with GitHub.
|
||||
|
||||
|
||||
+3
@@ -265,6 +265,9 @@ oauth2:
|
||||
# Enable device flow for Login with GitHub.
|
||||
# (default: false, type: bool)
|
||||
deviceFlow: false
|
||||
# Enable the default GitHub OAuth2 provider managed by Coder.
|
||||
# (default: true, type: bool)
|
||||
defaultProviderEnable: true
|
||||
# Organizations the user must be a member of to Login with GitHub.
|
||||
# (default: <unset>, type: string-array)
|
||||
allowedOrgs: []
|
||||
|
||||
Reference in New Issue
Block a user