## Summary **Batch B of Phase 3** of the H1 → front-matter migration (`DOCS-484`; parent `DOCS-477`), the editorial follow-up to Batch A (#28030). For the **124** hand-authored pages whose leading body H1 differed from the manifest nav label, this promotes the richer body H1 to the front-matter **page title** and drops the duplicate H1, while keeping the short manifest **label** as the sidebar entry. Policy agreed with the docs owner: - Short sidebar labels win. Duplicate sidebar labels are acceptable. - Identical **page titles** across two pages are not. On a collision, rename the non-generated page's title. ## Page-title collisions resolved Promoting the H1 created 4 page-title collisions; each is disambiguated by renaming the non-generated / secondary page (sidebar labels left unchanged): | page | sidebar label | body H1 | → page title | |------|---------------|---------|--------------| | `install/index.md` | Install | Installing Coder | **Install Coder in your infrastructure** | | `install/cli.md` | Coder CLI | Installing Coder | **Install the Coder CLI** | | `ai-gateway/clients/jetbrains.md` | JetBrains | JetBrains IDEs | **JetBrains** | | `workspace-access/web-ides.md` | Web IDEs and Coder Apps | Web IDEs | Web IDEs *(kept — primary user guide)* | | `extending-templates/web-ides.md` | Web IDEs and Coder Apps | Web IDEs | **Web IDEs in templates** | | `workspace-management.md` | Workspace Management | Workspaces | **Manage workspaces** *(vs generated `api/workspaces.md`)* | These titles are the only non-mechanical editorial calls in this PR. ## Deliberately excluded: generated pages `admin/security/audit-logs.md` and `admin/setup/configuration-reference.md` are `make gen` outputs (`auditdocgen` / `configdocgen`) that Phase 2 did **not** update, so a hand-added title would be reverted on the next generation. They're excluded here and need their generators taught to emit front matter first (Phase 2 pattern), tracked as `DOCS-631`. Batch A (#28030) had the same issue for three other generated pages; it has been corrected there too. ## Verification AI was the primary author of this PR (see disclosure below); per the [AI Contribution Guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) here is the manual verification. - Promote = set front-matter `title` to the body H1 (or the disambiguated title above) and remove that one duplicate H1. No other body prose is reflowed. - Every added front-matter block parses as YAML; all files pass `pnpm check-docs` (markdownlint-cli2 + table formatter): `Summary: 0 error(s)`. - Removing the H1 orphaned one in-page fragment (`[MCP](#mcp)` in `ai-gateway/mcp.md`), now repointed. A cross-file fragment audit into the retitled pages found no real breakage. Anchor-change note Unlike Batch A (title unchanged, a rendered no-op), Batch B changes each page's effective title from the manifest label to the body H1, so the rendered H1 **anchor slug changes**. An audit of cross-file `.md#fragment` links into these pages surfaced no links that break as a result (the only hits were false positives against a still-present `## TLS & Reverse Proxy` heading). Same-file fragments are enforced by markdownlint MD051, which is green. ## Title casing (follow-up, DOCS-742) A follow-up commit puts the promoted titles into sentence case and removes leading gerunds (for example, `Managing workspace schedules` → `Manage workspace schedules`): 57 of the 120 titles changed, the other 63 were already compliant. Proper nouns and branded names (Coder Validated Architecture, JetBrains, File Browser, Dev Containers, Island), acronyms (API, CLI, IDE, MCP, OIDC, URL, UI, CI/CD), the Premium license tier, and maturity labels (Beta, Experimental) are preserved. The four `Nk-users` pages become `Reference architecture: up to N users` (lowercase, matching the CVA landing page's own usage); the CVA landing page keeps its branded title. `pnpm check-docs`: `Summary: 0 error(s)`. Linear: DOCS-484, DOCS-742 > This PR was created with AI assistance (Coder Agents).
174 lines
6.2 KiB
Markdown
174 lines
6.2 KiB
Markdown
---
|
|
title: GitHub
|
|
---
|
|
|
|
By default, new Coder deployments use a Coder-managed GitHub app to authenticate
|
|
users.
|
|
We provide it for convenience, allowing you to experiment with Coder
|
|
without setting up your own GitHub OAuth app.
|
|
|
|
If you authenticate with it, you grant Coder server read access to your GitHub
|
|
user email and other metadata listed during the authentication flow.
|
|
|
|
This access is necessary for the Coder server to complete the authentication
|
|
process.
|
|
To the best of our knowledge, Coder, the company, does not gain access
|
|
to this data by administering the GitHub app.
|
|
|
|
## Default Configuration
|
|
|
|
> [!IMPORTANT]
|
|
> Installation of the default GitHub app grants Coder (the company) access to your organization's GitHub data.
|
|
>
|
|
> For production environments, we strongly recommend that you
|
|
> [configure your own GitHub OAuth app](#step-1-configure-the-oauth-application-in-github)
|
|
> to ensure that your data is not shared with Coder (the company).
|
|
|
|
To use the default configuration:
|
|
|
|
1. [Install the GitHub app](https://github.com/apps/coder/installations/select_target)
|
|
in any GitHub organization that you want to use with Coder.
|
|
|
|
The default GitHub app requires [device flow](#device-flow) to authenticate.
|
|
This is enabled by default when using the default GitHub app.
|
|
If you disable device flow using `CODER_OAUTH2_GITHUB_DEVICE_FLOW=false`, it will be ignored.
|
|
|
|
1. By default, only the admin user can sign up.
|
|
To allow additional users to sign up with GitHub, add:
|
|
|
|
```sh
|
|
CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS=true
|
|
```
|
|
|
|
1. (Optional) If you want to limit sign-ups to specific GitHub organizations, set:
|
|
|
|
```sh
|
|
CODER_OAUTH2_GITHUB_ALLOWED_ORGS="your-org"
|
|
```
|
|
|
|
## Disable the Default GitHub App
|
|
|
|
You can disable the default GitHub app by [configuring your own app](#step-1-configure-the-oauth-application-in-github)
|
|
or by adding the following environment variable to your [Coder server configuration](../../reference/cli/server.md#options):
|
|
|
|
```sh
|
|
CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER_ENABLE=false
|
|
```
|
|
|
|
> [!NOTE]
|
|
> After you disable the default GitHub provider, the **Sign in with GitHub** button
|
|
> might still appear on your login page even though the authentication flow is disabled.
|
|
>
|
|
> To completely hide the GitHub sign-in button, you must disable the default provider
|
|
> and ensure you don't have a custom GitHub OAuth app configured.
|
|
|
|
## Step 1: Configure the OAuth application in GitHub
|
|
|
|
1. [Register a GitHub OAuth app](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/).
|
|
|
|
1. GitHub will ask you for the following Coder parameters:
|
|
|
|
- **Homepage URL**: Set to your Coder deployment's
|
|
[`CODER_ACCESS_URL`](../../reference/cli/server.md#--access-url) (e.g.
|
|
`https://coder.domain.com`)
|
|
- **User Authorization Callback URL**: Set to `https://coder.domain.com`
|
|
|
|
If you want to allow multiple Coder deployments hosted on subdomains, such as
|
|
`coder1.domain.com`, `coder2.domain.com`, to authenticate with the
|
|
same GitHub OAuth app, then you can set **User Authorization Callback URL** to
|
|
the `https://domain.com`
|
|
|
|
1. Take note of the Client ID and Client Secret generated by GitHub.
|
|
You will use these values in the next step.
|
|
|
|
1. Coder needs permission to access user email addresses.
|
|
|
|
Find the **Account Permissions** settings for your app and select **read-only** for **Email addresses**.
|
|
|
|
## Step 2: Configure Coder with the OAuth credentials
|
|
|
|
Coder server reads these settings from environment variables. Set them
|
|
wherever your deployment manages environment variables. For example, use
|
|
Helm `values.yaml` for Kubernetes or `/etc/coder.d/coder.env` for a system
|
|
service.
|
|
|
|
**Kubernetes (Helm):** set the variables under `coder.env` in your
|
|
`values.yaml`:
|
|
|
|
```yaml
|
|
coder:
|
|
env:
|
|
- name: CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS
|
|
value: "true"
|
|
- name: CODER_OAUTH2_GITHUB_CLIENT_ID
|
|
value: "533...des"
|
|
- name: CODER_OAUTH2_GITHUB_CLIENT_SECRET
|
|
value: "G0CSP...7qSM"
|
|
# If setting allowed orgs, comment out CODER_OAUTH2_GITHUB_ALLOW_EVERYONE and its value
|
|
- name: CODER_OAUTH2_GITHUB_ALLOWED_ORGS
|
|
value: "your-org"
|
|
# If allowing everyone, comment out CODER_OAUTH2_GITHUB_ALLOWED_ORGS and its value
|
|
#- name: CODER_OAUTH2_GITHUB_ALLOW_EVERYONE
|
|
# value: "true"
|
|
```
|
|
|
|
Then apply the change with `helm upgrade`:
|
|
|
|
```sh
|
|
helm upgrade <release-name> coder-v2/coder -n <namespace> -f values.yaml
|
|
```
|
|
|
|
**System service:** add the variables to `/etc/coder.d/coder.env`:
|
|
|
|
```sh
|
|
CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS=true
|
|
CODER_OAUTH2_GITHUB_ALLOWED_ORGS="your-org"
|
|
CODER_OAUTH2_GITHUB_CLIENT_ID="8d1...e05"
|
|
CODER_OAUTH2_GITHUB_CLIENT_SECRET="57ebc9...02c24c"
|
|
```
|
|
|
|
Then restart Coder with `sudo service coder restart`.
|
|
|
|
> [!TIP]
|
|
> To allow everyone to sign up using GitHub, set:
|
|
>
|
|
> ```shell
|
|
> CODER_OAUTH2_GITHUB_ALLOW_EVERYONE=true
|
|
> ```
|
|
|
|
For GitHub Enterprise support, also set
|
|
`CODER_OAUTH2_GITHUB_ENTERPRISE_BASE_URL`.
|
|
|
|
> [!NOTE]
|
|
> Every option above also has an equivalent CLI flag (for example,
|
|
> `CODER_OAUTH2_GITHUB_CLIENT_ID` becomes `--oauth2-github-client-id`).
|
|
> CLI flags are convenient for ad-hoc invocations of `coder server` during
|
|
> local development. For production deployments, prefer environment
|
|
> variables so the configuration lives with the container, Helm chart, or
|
|
> service unit that manages Coder. See the
|
|
> [configuration reference](../setup/configuration-reference.md) for the
|
|
> full mapping between environment variables and flags.
|
|
|
|
We recommend requiring and auditing MFA usage for all users in your GitHub organizations.
|
|
This can be enforced from the organization settings page in the **Authentication security** sidebar tab.
|
|
|
|
## Device Flow
|
|
|
|
Coder supports
|
|
[device flow](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#device-flow)
|
|
for GitHub OAuth.
|
|
This is enabled by default for the default GitHub app and cannot be disabled for that app.
|
|
|
|
For your own custom GitHub OAuth app, you can enable device flow by setting:
|
|
|
|
```sh
|
|
CODER_OAUTH2_GITHUB_DEVICE_FLOW=true
|
|
```
|
|
|
|
Device flow is optional for custom GitHub OAuth apps.
|
|
We generally recommend using the standard OAuth flow instead, as it is more convenient for end users.
|
|
|
|
> [!NOTE]
|
|
> If you're using the default GitHub app, device flow is always enabled regardless of
|
|
> the `CODER_OAUTH2_GITHUB_DEVICE_FLOW` setting.
|