redirect_uri_mismatch http://127.0.0.1:5000/login/callback
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- flask, python
- Domain
- authentication, backend
Research direction
Start in the flask-google-login material and inspect how the OAuth callback URL is assembled from the application configuration and environment variables. Compare that value with the domain and callback URI registered for the Google OAuth client; the issue is resolved when the deployed HTTPS callback is accepted without redirect_uri_mismatch.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- Jupyter Notebook
- Stars
- 5.2k
- Forks
- 5.3k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from realpython/materials
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
realpython/materials#729 ·
-
п Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
realpython/materials#763 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
realpython/materials#738 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
realpython/materials#737 ·
-
проект2 Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
realpython/materials#725 ·
All issues in realpython/materials
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·
-
security severity:low track:open-source
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[addtool] DeepZero Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gwen001/offsectools_www#2055 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
WalletConnect/actions#112 ·