0

I'm trying to implement a simple login system in my python/flask app with Google auth, but I'm getting this error on the browser:

  1. That’s an error.

Error: invalid_request

Invalid parameter value for redirect_uri: Invalid scheme: ('http://localhost:8080/oauth2callback',)

This is the screen shot of the browser: enter image description here


Google console credentials are configured like:

Authorised JavaScript origins: http://localhost:8080
Authorised redirect URIs: http://localhost:8080/oauth2callback

enter image description here


My implementation is based on this gist: https://gist.github.com/ashish01/2a4a0f9b525096633ca2

My line 15 is configured like:

GOOGLE_LOGIN_REDIRECT_URI='http://localhost:8080/oauth2callback',

And I get this error when I try to access the route '/home'

Does anyone knows why Google are complaining about the scheme and how to fix this?

1 Answer 1

1

you have invalid chars in your redirect URI

('http://localhost:8080/oauth2callback',)

extra , on the end.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks @DaImTo. There was a typo in the config: GOOGLE_LOGIN_CLIENT_ID='123456789-11111111111111111111.apps.googleusercontent.com', Do you see the commas in the end?.. my bad!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.