Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2424 Vistas

Hi! I have Odoo 17.0-20231222 (Community Edition) and I am trying to setup AzureAD authentication, but for some reason after authentication it sends me to a wrong redirect URI - http:// instead of https:// though everything else seems to be correct. I've tried to freeze web.baze.url to https, but it does not change anything. Please help.

Error message:

AADSTS50011: The redirect URI 'http://my.domain/auth_oauth/signin' specified in the request does not match the redirect URIs configured for the application 'ClientID'. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to https://aka.ms/redirectUriMismatchError to learn more about how to fix this.

Avatar
Descartar

Hi Iron,

Were you able to find a solution to this issue? 

I've tried the proxy_mode = true in the configuration but am still experiencing this issue.

Thank you!

M

Mejor respuesta

Hi Iron, 



I was facing same issue and I did the below configuration and it was solved. 

Please check the configuration.


in /etc/odoo.conf set:

proxy_mode = True



in /etc/nginx/sites-enabled/odoo.conf set

#odoo server

upstream odoo {

server 127.0.0.1:8069;

}


upstream odoochat {

server 127.0.0.1:8072;

}


# http -> https

server {

   listen 80;

   server_name odoo.mycompany.com;

   rewrite ^(.*) https://$host$1 permanent;

}


server {

listen 443 ssl;

server_name odoo.mycompany.com;

proxy_read_timeout 720s;

proxy_connect_timeout 720s;

proxy_send_timeout 720s;


# Add Headers for odoo proxy mode

proxy_set_header X-Forwarded-Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;

# SSL parameters

ssl_certificate /etc/ssl/nginx/server.crt;

ssl_certificate_key /etc/ssl/nginx/server.key;

ssl_session_timeout 30m;

ssl_protocols TLSv1.2;

ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;

ssl_prefer_server_ciphers off;

# log

access_log /var/log/nginx/odoo.access.log;

error_log /var/log/nginx/odoo.error.log;


# Redirect longpoll requests to odoo longpolling port

location /longpolling {

proxy_pass http://odoochat;

}


# Redirect requests to odoo backend server

location / {

   proxy_redirect off;

   proxy_pass http://odoo;

}


# common gzip

gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;

gzip on;

}



-JC
  Kriyansh Tech Solutions

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
ene 25
1888
0
sept 24
1266
2
oct 23
4032
1
jul 23
4215
1
feb 23
2034