GitHub Oauth redirect_uri_mismatch

I’m currently using the accounts-github package. In development I’m able to configure my github login via the configure button. On my github page I have:

homepage url: http://localhost:3000
Authorization callback url: http://localhost:3000/_oauth/github

On a staging server, I’ve reset the database, installed all the packages and follow the same steps, except my service is running on port 80.

I’ve tried several combinations of the following but continue to get this error:

W20160408-17:23:54.845(0) (oauth.js:428) Error in OAuth Server: redirect_uri_mismatch

homepage url:
authorization callback url: httpL//

I’ve tried adding :80 and several other things. Anyone have any idea why this might not be working? The client/secret keys are all correct and have been changed over and over again. The db connection works fine, as the configuration data gets in. I’m running this on an aws ubuntu 64-bit instance.

make sure you environment variable matches your uri (http vs https) in your settings.json… i also forgot that my staging/production is https and had the uri as https but the env variable as http

  "": {
    "env": {
      "ROOT_URL": "https://",
      "MONGO_URL": "mongoURLhere"
1 Like

Interesting. So I have yet to use a settings.json file and cannot find documentation on what’s needed for it with accounts-github. There is no settings.json in my dev environment and it works fine. I’m also not using SSL in either environment at the moment.

I have the same problem. I’m really surprised there is not better documentation on the login functionality.

This is working for me!

ROOT_URL= meteor