From 7b0657abb0232a9ea78a954b2f36a7fd8525f032 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 28 Jul 2023 09:59:35 +0300 Subject: [PATCH 1/4] docs: Add instructions for using the same GitHub OAuth app for multiple Coder deployments --- 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 b80318b83fa13..c0ddf21b7771f 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 deploymnets hosted on subdomians e.g. coder1.domain.com, coder2.domain.com, to be able to autheticate with same gitHub OAuth app, then you can set **User Authorization Callback URL** to `https://domain.com` Note the Client ID and Client Secret generated by GitHub. You will use these values in the next step. From 4358f38ba22d95d5574d7c3297408b00b2cf859c Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Fri, 28 Jul 2023 07:19:47 +0000 Subject: [PATCH 2/4] fmt --- docs/admin/auth.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/admin/auth.md b/docs/admin/auth.md index c0ddf21b7771f..42a80daa16f82 100644 --- a/docs/admin/auth.md +++ b/docs/admin/auth.md @@ -16,8 +16,8 @@ First, [register a GitHub OAuth app](https://developer.github.com/apps/building- - **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 deploymnets hosted on subdomians e.g. coder1.domain.com, coder2.domain.com, to be able to autheticate with same gitHub OAuth app, then you can set **User Authorization Callback URL** to `https://domain.com` + +> Note: If you want to allow multiple coder deploymnets hosted on subdomians e.g. coder1.domain.com, coder2.domain.com, to be able to autheticate with same gitHub OAuth app, then you can set **User Authorization Callback URL** to `https://domain.com` Note the Client ID and Client Secret generated by GitHub. You will use these values in the next step. From 658af0cf7c6bc5866bfd62d2acfedf880e9fae21 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 28 Jul 2023 10:24:22 +0300 Subject: [PATCH 3/4] typo --- docs/admin/auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/auth.md b/docs/admin/auth.md index 42a80daa16f82..4859a834ebfd0 100644 --- a/docs/admin/auth.md +++ b/docs/admin/auth.md @@ -17,7 +17,7 @@ First, [register a GitHub OAuth app](https://developer.github.com/apps/building- - **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 deploymnets hosted on subdomians e.g. coder1.domain.com, coder2.domain.com, to be able to autheticate with same gitHub OAuth app, then you can set **User Authorization Callback URL** to `https://domain.com` +> Note: If you want to allow multiple coder deploymnets hosted on subdomians e.g. coder1.domain.com, coder2.domain.com, to be able to authenticate with same gitHub OAuth app, then you can set **User Authorization Callback URL** to `https://domain.com` Note the Client ID and Client Secret generated by GitHub. You will use these values in the next step. From 4e28acd2067894d360cb6e43a9cfb714887eb055 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sat, 29 Jul 2023 00:16:25 +0300 Subject: [PATCH 4/4] Update auth.md --- docs/admin/auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/auth.md b/docs/admin/auth.md index 4859a834ebfd0..4c09ba7ab459d 100644 --- a/docs/admin/auth.md +++ b/docs/admin/auth.md @@ -17,7 +17,7 @@ First, [register a GitHub OAuth app](https://developer.github.com/apps/building- - **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 deploymnets hosted on subdomians e.g. coder1.domain.com, coder2.domain.com, to be able to authenticate with same gitHub OAuth app, then you can set **User Authorization Callback URL** to `https://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.