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

redirect_uri_mismatch http://127.0.0.1:5000/login/callback #95

Open
aspiringguru opened this issue Jan 10, 2020 · 0 comments
Open

redirect_uri_mismatch http://127.0.0.1:5000/login/callback #95

aspiringguru opened this issue Jan 10, 2020 · 0 comments

Comments

@aspiringguru
Copy link

aspiringguru commented Jan 10, 2020

I've really enjoyed the content. Found the blog re "Create a Flask Application With Google Login"
https://realpython.com/flask-google-login/

https://github.com/realpython/materials/blob/master/flask-google-login/

I got to running the app and this error.

Error: redirect_uri_mismatch
The redirect URI in the request, http://127.0.0.1:5000/login/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/310636517232-hh287vg31jbjbqe0hguc2ahmtqcrbr13.apps.googleusercontent.com?project=310636517232

I have setup nginx to redirect a domain to my flask server. Loads on a https page with a valid cert generated by certbot.
have configured my google app with my domain url.
have a working route at mydomain/login/callback

I can't see where http://127.0.0.1:5000 is set in my code. I did find old stackexchange references to setting the redirect instead of accepting the default (java examples not python).

The as published demo with redirection to localhost was working for me previously. (have deleted the previously working with localhost google app and created new google app, updated environment variables etc. exited shell, restarted ubuntu etc.

ideas?

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

1 participant