GitHub oauth redirect_uri not updating

I am using github-accounts package to authenticate users with GitHub.

No matter how I change the setting in GitHub's application settings interface, when I try to sign in with GitHub, an error is thrown because I am sending an old redirect_uri parameter to oauth

redirect_uri=http://myWebsite.com

But in the application settings, I have already updated the Homepage URL and Authorization callback URL to something else entirely. It should not be passing that value as redirect_uri.

I tried to restart the server with no success. I did global search on my codebase but there is no code that is setting the redirect_uri as such.

How can I stop passing the old redirect_uri? The problem has been persisting for days.

Answers


accounts-github package will automatically pass the value of ROOT_URL environment variable as a redirect_uri parameter when authenticating via Oauth (not documented).

My env variables were being set by mup within its configuration file. The config file was gitignored, so my global code search did not reveal the culprit.

I changed the ROOT_URL env variable to the desired value, and resolved the problem.


Need Your Help

NodeJS logs service design

node.js mongodb

I need to write logs service using NodeJS and Mongo.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.