I get 502 Bad Gateway - nginx Error, when try connect with Social connects

This problem related with your NGINX server.

Your server does not support Too Large Request URI

Try add or change (if exists this parametr) here: /etc/nginx/nginx.conf on the:

large_client_header_buffers 4 32k;
fastcgi_buffers 16 32k;
fastcgi_buffer_size 32k;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;

You will also find other SPM Prestashop Modules