docker
docker copied to clipboard
Google OAuth - http redirect issue - ODOO 18.0
It seems that clicking on Connect your Gmail accout in odoo fails because of a 400: redirect_uri_mismatch error.
I have attempted everything in the documents however something isn't lining up and I do not believe it is my configuration.
HTTP > HTTPS redirect is working correctly on my site/server through my reverse proxy
reply from Google:
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.
Request details: redirect_uri=http://myhostnamehere.com/google_gmail/confirm flowName=GeneralOAuthFlow
[Related developer documentation](https://developers.google.com/identity/protocols/oauth2/web-server#authorization-errors-redirect-uri-mismatch)
If I try to visit: http://myhostnamehere.com/google_gmail/confirm
I do get the FORBIDDEN error message - however I have updated the google plug in as described in the documentation and that hasn't fixed it. This is also a new installation so I would assume the latest plug in would have been installed.
Forbidden
You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.
I am stuck unfortuantely at this point to understand how to move forward.
Hey @NOTORIOUSVR I have also "such" problem, but with connecting using Keycloak. Check your URL after clicking log in with google (in my case with Keycloak).
In my URL https://accounts.odoo.com/web/login?scope=userinfo&mode=login&login=&redirect_hostname=http%3A%2F%2Flocalhost%3A8069&redirect=%2Foauth2%2Fauth%2F%3Fresponse_type%3Dtoken%26client_id%3D9ee01326-faa0-11ef-a681-ffce1fc1383b%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A8069%252Fauth_oauth%252Fsignin%26scope%3Duserinfo%26state%3D%257B%2522d%2522%253A%2B%2522main%2522,%2B%2522p%2522%253A%2B1,%2B%2522r%2522%253A%2B%2522http%25253A%25252F%25252Flocalhost%25253A8069%25252Fodoo%25253F%2522%257D I have redirect set to http://localhost:8069/oauth2/auth/ which isn't valid in my case. Beacause Odoo is hosted under different path.
I'm using Odoo in Docker.
Dear,
Did you solve the problem? I got the same error.
Thank you in advanced,
Hello, Anyone solved this issue? I am having the same issue in odoo.sh 17. Everything setup as instructed and always getting the 400: redirect_uri_mismatch
Thanks
I doubt this has to do with odoo docker. Have you tried to set the following settings?
web.base.url.freeze = true web.base.url = https://your.odoo.tld
I doubt this has to do with odoo docker. Have you tried to set the following settings?
web.base.url.freeze = true web.base.url = https://your.odoo.tld
Where are these settings to be added/changed?
Under system parameters
I am having the same issue.
In the error description from google I get the following description:
redirect_uri=http://
I have same issue, with params:
[ir.config_parameter] web.base.url = https://odoo.mydomain.es web.base.url.freeze = True
I have installed the module server_environment_ir_config_parameter
It shows http instead httpS
Exactly the same as above over here! While Odoo13 is still able to sync the Google Agenda but odoo18 (also running in docker on the same host) is sending the request with a http-URI instead of https.
@Dax1900 i fixed adding in the proxy X-Forwarded-Proto (cloudflare in my case)