jphortense
jphortense

Reputation: 131

Google authentication in python/flask error: Invalid parameter value for redirect_uri: Invalid scheme: ('http://localhost:8080/oauth2callback',)

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?

Upvotes: 0

Views: 1167

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117254

you have invalid chars in your redirect URI

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

extra , on the end.

Upvotes: 1

Related Questions