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

OAuth in production results in redirect_uri_mismatch #579

Closed
danXyu opened this issue Aug 25, 2015 · 2 comments
Closed

OAuth in production results in redirect_uri_mismatch #579

danXyu opened this issue Aug 25, 2015 · 2 comments

Comments

@danXyu
Copy link

danXyu commented Aug 25, 2015

error

Using Github Oauth, I set the proper Client ID and Client Secret through the admin page. The oauth works perfectly in a development environment, but when pushed to production, it results in a redirect_uri_mismatch as shown above (tested running 'node main.js' with env variables set).

Authorization callback URL when in production is set to:
http://104.131.8.9/_oauth/github

That IP Address resolves to the production app on the remote server, served with nginx.

@Sing-Li
Copy link
Member

Sing-Li commented Aug 25, 2015

You MUST set the callback URL, and your ROOT_URL to the exact domain name. Not IP address in one, and domain name in another. It is a 'string compare' and will not 'resolve'.

@danXyu
Copy link
Author

danXyu commented Aug 25, 2015

That was quick. It worked. I didn't know it was a string compare between the two values. Guess it wasn't much of an issue after all haha, thanks a ton though.

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

2 participants