Skip to content
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

init: oauth docs #2565

Merged
merged 4 commits into from Jun 22, 2022
Merged

init: oauth docs #2565

merged 4 commits into from Jun 22, 2022

Conversation

ericpaulsen
Copy link
Member

adds new docs on how to configure GitHub OAuth.

@ericpaulsen ericpaulsen added the docs Area: docs label Jun 21, 2022
@ericpaulsen ericpaulsen self-assigned this Jun 21, 2022
Comment on lines 9 to 10
When [https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/](creating an OAuth app),
GitHub will ask you for the following Coder parameters:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When [https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/](creating an OAuth app),
GitHub will ask you for the following Coder parameters:
First, [https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/](register a GitHub OAuth app). GitHub will ask you for the following Coder parameters:

Comment on lines 27 to 29
Alternatively, if you already have a running Coder instance, you can achieve the
same result as the command above by adding the following environment variables
to the `/etc/coder.d/coder.env` file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Alternatively, if you already have a running Coder instance, you can achieve the
same result as the command above by adding the following environment variables
to the `/etc/coder.d/coder.env` file:
Alternatively, if you are running Coder as a system servide, you can achieve the
same result as the command above by adding the following environment variables
to the `/etc/coder.d/coder.env` file:

CODER_OAUTH2_GITHUB_CLIENT_SECRET="57ebc9...02c24c"
```

Once complete, run `sudo systemctl enable --now coder` to reboot Coder.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Once complete, run `sudo systemctl enable --now coder` to reboot Coder.
Once complete, run `sudo service coder restart` to restart Coder.

},
{
"title": "GitHub OAuth",
"description": "Learn how to authenticate with GitHub.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Learn how to authenticate with GitHub.",
"description": "Learn how to set up OAuth using your GitHub organization.",

# GitHub OAuth

By default, Coder is accessible via built-in authentication. Alternatively, you
can configure Coder to enable logging in through GitHub OAuth. See below for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work with GitHub Enterprise or just GitHub? Might be nice to specify ;)

cc @kylecarbs

When [https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/](creating an OAuth app),
GitHub will ask you for the following Coder parameters:

- **Homepage URL**: Set to your Coder domain, e.g. `https://coder.domain.com`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Homepage URL**: Set to your Coder domain, e.g. `https://coder.domain.com`
- **Homepage URL**: Set to your Coder domain (e.g., `https://coder.domain.com`)

- **Homepage URL**: Set to your Coder domain, e.g. `https://coder.domain.com`
- **User Authorization Callback URL**: Set to `https://coder.domain.com/api/v2/users/oauth2/github/callback`

Note the Client ID and Client secret generated by GitHub. You will use these
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note the Client ID and Client secret generated by GitHub. You will use these
Note the Client ID and Client Secret generated by GitHub. You will use these

@ericpaulsen ericpaulsen merged commit 7dc3f5f into main Jun 22, 2022
@ericpaulsen ericpaulsen deleted the github-oauth branch June 22, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Area: docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants