Skip to content

docs: document that default GitHub app requires device flow #17162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/admin/users/github-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ 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.

> [!IMPORTANT]
> 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.

By default, only the admin user can sign up. To allow additional users to sign
up with GitHub, add the following environment variable:

Expand Down Expand Up @@ -124,11 +129,16 @@ organizations. This can be enforced from the organization settings page in the

Coder supports
[device flow](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#device-flow)
for GitHub OAuth. To enable it, set:
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:

```env
CODER_OAUTH2_GITHUB_DEVICE_FLOW=true
```

This is optional. We recommend using the standard OAuth flow instead, as it is
more convenient for end users.
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.
Loading