Github Oauth does not work


(Matthieu) #1

Hi,

I have 2 discourse instance, both on 1.4beta1. On one I managed to make the GitHub Oauth works but on the other I never managed to do it.

I just tried another time by redoing the process and still it is not working and I have absolutly no idea why. I hope you will be able to help identify the problem.

So here is my configuration:

On discourse:

On our github:

When I try to login with my github account I get this error:

with this url:

https://forum.poppy-project.org/auth/failure?message=redirect_uri_mismatch&origin=https%3A%2F%2Fforum.poppy-project.org%2F&strategy=github

And strong texthere is NOTHING neither in the Discourse logs nor the browser console** …

For a developper community it is really a shame to not have a github Auth …


(Jeff Atwood) #2

Can you log in with GitHub here? If so then the code is not at fault, it has to be something about the specifics of your configuration, either https or settings… what you pasted looks correct to me though. @neil do you see anything amiss?


(Jeff Atwood) #3

Confirmed I just logged in here via GitHub so the code is working. It’s some kind of configuration issue, either with your GitHub auth settings, or your discourse instance.


(Matthieu) #4

Yep here it is working, it is also working on another Discourse we have: https://openlab-flowers.inria.fr/

The difference is maybe the certificat ? On the other one ( https://forum.poppy-project.org ) we have a domain with a specific SSL certificat.


(Lucs T) #5

Hello, Same issue here https://forum.cozy.io

What I can say is :
-> Works well before a recent update
-> I’m now in 1.4beta1 (9675b42)
-> Github SSO configuration seems OK, and it’s in all way comparable to Matthieu first post
-> Nothing move recently in https config.
-> There is a Nginx front-end that handle ssl encapsulation

@Matthieu : as you can see I’m using a wildcard certificate

Help or advice welcome

Lucs


(Neil Lalonde) #6

I don’t see anything wrong… Github auth is working on other sites that we updated to 1.4.0.beta1 (Rust, Atom, Ember). I don’t have any suggestions. :confused:


(Matthieu) #7

Ok so we finally found the problem:

Discourse was using HTTP while our conf is HTTPS. We had to reconfigure it on our server.


(Sam Saffron) #8