Redirect URI in OAuth 2.0 Client IDs

Hello, there!

Could anybody help me?

I have a trouble with https://nutson.us/ as redirect URI

getting code

https://accounts.google.com/o/oauth2/v2/auth?”
“response_type=code&”
f"client_id={credentials.client_id}&"
“state=google&”
“scope=openid&”
f"redirect_uri=https://nutson.us"

redirect to https://nutson.us/feed/recommended?state=google&code=some_code&scope=openid&authuser=1&prompt=none
next make an request to getting access_token
https://oauth2.googleapis.com/token
and getting error {‘error’: ‘invalid_grant’, ‘error_description’: ‘Bad Request’}

if we use a http://127.0.0.1:8000 or https://www.google.com

all is ok

Can you share the code that sends the initial OAuth request from your web application? If you are locally serving the application, using your live app’s redirect URI will produce this error, as shown from this related thread. For general causes of this error, you can review this other post. Finally, the documentation provides rules for allowed redirect URIs, which you can also check.

Thanks, great Idea!!! It was useful fo me.

King regards for You, Ernesto!