Skip to content

OAuth misconfiguration does not return an error message #2465

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

Closed
ericpaulsen opened this issue Jun 17, 2022 · 4 comments
Closed

OAuth misconfiguration does not return an error message #2465

ericpaulsen opened this issue Jun 17, 2022 · 4 comments

Comments

@ericpaulsen
Copy link
Member

ericpaulsen commented Jun 17, 2022

After attempting to configure GitHub OAuth, I tried to login with GitHub. I was immediately taken to a 404 page, with no user-friendly context about why I'm receiving the error (other than the error being returned in the URL string).

Screen Shot 2022-06-17 at 10 25 15 AM

URL string:

https://coderv2.ericpaulsen.io/oauth/callback?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch&state=UsBCktUNaXHWFIIh8RA7R4V6FLTppxI1
@ericpaulsen ericpaulsen added the site Area: frontend dashboard label Jun 17, 2022
@misskniss misskniss added this to the Community MVP milestone Jun 21, 2022
@misskniss
Copy link

@ericpaulsen can we get a little more info on this. Was this just an incorrect URL that you fixed?

@misskniss misskniss removed this from the Community MVP milestone Jun 21, 2022
@ericpaulsen
Copy link
Member Author

@misskniss I haven't been able to fix this issue. here's my coder.env values, which seem correct:

CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS=true
CODER_OAUTH2_GITHUB_CLIENT_ID="8d1...e05"
CODER_OAUTH2_GITHUB_CLIENT_SECRET="57ebc9...02c24c"

@ericpaulsen
Copy link
Member Author

the issue is with the callback URL i used in my GitHub OAuth configuration. it was domain.com/oauth/callback when it should be domain.com/api/v2/users/oauth2/github/callback

i document this in #2565

@kylecarbs
Copy link
Member

I'm going to close this as won't fix since this was primarily user error.

@kylecarbs kylecarbs closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2022
@misskniss misskniss added invalid and removed site Area: frontend dashboard labels Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants