# Github authentication redirect error

**URL:** https://meta.discourse.org/t/github-authentication-redirect-error/157718
**Category:** Support
**Created:** [July 14, 2020, 4:17pm UTC](https://meta.discourse.org/t/github-authentication-redirect-error/157718 "2020-07-14T16:17:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![iamtunde](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamtunde/32/139960_2.png) [@iamtunde](https://meta.discourse.org/u/iamtunde)
#### Post date: [July 14, 2020, 4:17pm UTC](https://meta.discourse.org/t/github-authentication-redirect-error/157718/1 "2020-07-14T16:17:50Z")

</div>

Hello Friends, a friendly newbie here.

I have this problem with configuring login with Github on my discourse installation, after providing the necessary API keys required in the **Admin \> Settings \> Login** page in the github setup section.

Clicking on the Github login option redirects to a 404 page and returns the screenshot below.

and this in the URL bar  
`https://MYDOMAIN/auth/oauth2_basic/callback?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch&state=29b1f640d906a3bf4d92a1fe5846af740eea49adbfbfb65c`

 ![Screenshot from 2020-07-14 17-14-26](https://global.discourse-cdn.com/meta/original/3X/1/1/11eb448be3249df27f2ce56d7af98c1b3f5d3879.png)

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [July 14, 2020, 4:34pm UTC](https://meta.discourse.org/t/github-authentication-redirect-error/157718/2 "2020-07-14T16:34:31Z")

</div>

Hello Tunde, nice to see you here 🙂 👋

Did you follow this guide to setup your GitHub login?

> [@Configure GitHub login for Discourse](https://meta.discourse.org/t/configuring-github-login-for-discourse/13745):
>
> bookmark This guide explains how to set up GitHub as a login option for your Discourse forum by configuring OAuth credentials. person_raising_hand Required user level: Administrator Overview GitHub login integration allows users to sign in to your Discourse site using their GitHub accounts. This provides a convenient authentication option, especially useful for developer-focused communities. Setting up GitHub OAuth Visit GitHub’s developer settings at https://github.com/settings/dev…

---

<div class="post-metadata">

### Author: ![iamtunde](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamtunde/32/139960_2.png) [@iamtunde](https://meta.discourse.org/u/iamtunde)
#### Post date: [July 14, 2020, 4:48pm UTC](https://meta.discourse.org/t/github-authentication-redirect-error/157718/3 "2020-07-14T16:48:05Z")

</div>

Hi Osioke, thank you for your reply.

I did follow the guide and still couldn’t get it fixed, I eventually found a fix on my own.

Apparently the callback URL from the guide isn’t quite correct, I changed it from `https://mydomain/auth/callback/github` **to** `https://mydomain/auth/github` and everything works well.

Perhaps the guide should be updated for future readers.

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [July 14, 2020, 4:51pm UTC](https://meta.discourse.org/t/github-authentication-redirect-error/157718/4 "2020-07-14T16:51:15Z")

</div>

Glad you were able to sort it out, interestingly, the guide uses the same URL you shared:

> [@Configure GitHub login for Discourse](https://meta.discourse.org/t/configure-github-login-for-discourse/13745/1):
>
> Be sure to set the Callback URL to use the path `/auth/github/callback` at your site domain. e.g., `https://discuss.example.com/auth/github/callback`

So we are good here.

Seeing as you mentioned you were able to resolve it and you found a fix:

> [@iamtunde](#):
>
> I eventually found a fix on my own.

I’ll be closing this off now. Cheers! 🙂

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [July 14, 2020, 4:51pm UTC](https://meta.discourse.org/t/github-authentication-redirect-error/157718/5 "2020-07-14T16:51:18Z")

</div>


