lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.45k stars 445 forks source link

Possible typo in flask-google-login/README.md #568

Closed offby1 closed 1 year ago

offby1 commented 1 year ago

Describe the bug

I followed the instructions in that file, but kept seeing Error 400: redirect_uri_mismatch in my browser, instead of the home page that I expected.

To Reproduce

Just follow the instructions in that README exactly. In particular, ensure that the URL that you enter into https://console.cloud.google.com/apis/credentials ends with a slash, like it says in the README.

Expected behavior

When I visited http://127.0.0.1:5000/login in my browser, I expected to see the example site's home page, with a json blob at the top of the page.

Environment:

Additional context

I removed the trailing slash from the URL in the google cloud console and tried again, and now it works 🎉. I don't know why it didn't work before, but I wonder if the behavior of flask's url_for function has changed -- it now appends a /, but perhaps before, when this demo was written, it didn't.