Github integration for the whole org
I want to create a OAuth for my whole github organisation, so If a user signs in with there github account on coder, then they can clone private github repo (accessible to them) to the workspace directly. For me to achieve this, setting up the github app is enough?
16 Replies
<#1347210246611013815>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Using this, https://coder.com/docs/admin/users/github-auth?
or is there any easier to clone private github repos from template directtly into the workspace?
yes
you, as an org admin, have to allow the github app
and then the individual users should be able to clone repos using the token obtained via external auth
environment:
CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS: true
CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER_ENABLE: false
CODER_OAUTH2_GITHUB_DEVICE_FLOW: true
CODER_OAUTH2_GITHUB_ALLOWED_ORGS: "example"
CODER_EXTERNAL_AUTH_0_ID: github
CODER_EXTERNAL_AUTH_0_TYPE: github
CODER_EXTERNAL_AUTH_0_CLIENT_ID: "${CODER_GITHUB_CLIENT_ID}"
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET: "${CODER_GITHUB_CLIENT_SECRET}"
i added this in my docker compose file but cant see the login option.

yes, external auth does not let you log in via the UI
external auth is only used to pass the token to workspaces
if you want users to be able to log in via GitHub, you need to also set up OAuth
then how can a user pass this token to the workspace, little lost
oh ok nvm, so external auth basically helps with accessing the github if you used it to sign up.
OAuth:

External Auth:

but what if someone havent signed in with github, just email
oh so they can use this
got it
External Auth will log me in to GitHub, the
gcloud
CLI and the slackme
module in this casethanks so much Phorcys resolved! I was confused between what Oauth did and external auth did.
didnt knew this setting existed.
if this image is on the docs that will make it easier for other people
noted!
marking this as "improvement-needed" so we can come back to it
@Phorcys closed the thread.
can I edit the docs there?
and pull request, if this will be helpful let me know.
definitely
docs are in https://github.com/coder/coder/tree/main/docs
GitHub
coder/docs at main · coder/coder
Provision remote development environments via Terraform - coder/coder