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
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.
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.