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

docs: allow multiple Coder deployments to use single GitHub OAuth app #8786

Merged
merged 4 commits into from
Jul 31, 2023

Conversation

matifali
Copy link
Collaborator

@matifali matifali commented Jul 28, 2023

If you have multiple Coder deployments and want to log in with GitHub OAuth.
Coder passes the redirect-uri in the form,

authRedirect, err := accessURL.Parse(fmt.Sprintf("/gitauth/%s/callback", entry.ID))

And it matches the now updated callback URL as per their docs

The redirect_uri parameter is optional. If left out, GitHub will redirect users to the callback URL configured in the OAuth app settings. If provided, the redirect URL's host (excluding sub-domains) and port must exactly match the callback URL. The redirect URL's path must reference a subdirectory of the callback URL.

CALLBACK: http://example.com/path

GOOD: http://example.com/path
GOOD: http://example.com/path/subdir/other
GOOD: http://oauth.example.com/path
GOOD: http://oauth.example.com/path/subdir/other
BAD:  http://example.com/bar
BAD:  http://example.com/
BAD:  http://example.com:8080/path
BAD:  http://oauth.example.com:8080/path
BAD:  http://example.org

Originally from #8714
I have tested this with my own deployment and PR deployments.

@matifali matifali changed the title docs: add instructions for using the same GitHub OAuth app for multiple Coder deployments docs: add instructions to use same GitHub OAuth app with multiple Coder deployments Jul 28, 2023
@matifali matifali changed the title docs: add instructions to use same GitHub OAuth app with multiple Coder deployments docs: use same GitHub OAuth app with multiple Coder deployments Jul 28, 2023
@matifali matifali changed the title docs: use same GitHub OAuth app with multiple Coder deployments docs: how to allow multiple Coder deployments to use same GitHub OAuth app Jul 28, 2023
@matifali matifali changed the title docs: how to allow multiple Coder deployments to use same GitHub OAuth app docs: allow multiple Coder deployments to use same GitHub OAuth app Jul 28, 2023
@matifali matifali changed the title docs: allow multiple Coder deployments to use same GitHub OAuth app docs: allow multiple Coder deployments to use single GitHub OAuth app Jul 28, 2023
@ericpaulsen ericpaulsen merged commit af036b4 into main Jul 31, 2023
18 checks passed
@ericpaulsen ericpaulsen deleted the docs-github-oauth branch July 31, 2023 14:00
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants