From af036b440bd776f5fe57e0ddea7fc0c0596ffff7 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 31 Jul 2023 17:00:48 +0300 Subject: [PATCH] docs: allow multiple Coder deployments to use single GitHub OAuth app (#8786) * docs: Add instructions for using the same GitHub OAuth app for multiple Coder deployments * fmt * typo * Update auth.md --- docs/admin/auth.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/admin/auth.md b/docs/admin/auth.md index b80318b83f..4c09ba7ab4 100644 --- a/docs/admin/auth.md +++ b/docs/admin/auth.md @@ -14,8 +14,10 @@ The following steps explain how to set up GitHub OAuth or OpenID Connect. First, [register a GitHub OAuth app](https://developer.github.com/apps/building-oauth-apps/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`) -- **User Authorization Callback URL**: Set to `https://coder.domain.com/api/v2/users/oauth2/github/callback` +- **Homepage URL**: Set to your Coder deployments [`CODER_ACCESS_URL`](https://coder.com/docs/v2/latest/cli/server#--access-url) (e.g. `https://coder.domain.com`) +- **User Authorization Callback URL**: Set to `https://coder.domain.com` + +> Note: If you want to allow multiple coder deployments hosted on subdomains e.g. coder1.domain.com, coder2.domain.com, to be able to authenticate with the same GitHub OAuth app, then you can set **User Authorization Callback URL** to the `https://domain.com` Note the Client ID and Client Secret generated by GitHub. You will use these values in the next step.