This question has been flagged
1 Reply
6768 Views

When you click login with google, the redirect uri is being changed from https:// to http://

I checked my parameters to make sure the web.base.url is set to the correct https value.  
I also added a web.base.url.freeze value of True.

I can modify line 74 of addons/auth_oauth/controllers.main.py and explicitly define the url and it works.

redirect = request.params.get('redirect') or 'web'
if not redirect.startswith(('//', 'http://', 'https://')):
    redirect = '%s%s' % (request.httprequest.url_root, redirect[1:] if redirect[0] == '/' else redirect)

We are using nginx.

Avatar
Discard

i am also facing same issue any solution please

Best Answer

odoo 16, encountered the same redirect_uri_mismatch problem

error 400:redirect_uri_mismatch

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.

If you're the app developer, register the redirect URI in the Google Cloud Console.
要求詳情: redirect_uri=http://xxx.ccc.com/auth_oauth/signin

Avatar
Discard