What I am trying to achieve is when a user is logged in on main-app-site.com they are also logged in when visiting client-site-a.com, client-site-b.com, and so on.
Please, read on as client-site-a.com is a reverse proxy of content on main-app-site.com hence, both $_SERVER['HTTP_HOST'] and $_SERVER['HTTP_SERVER'] are set to main-app-site.com on all subdomains and custom domains.
In other words, I want to retrieve a cookie from main-app-site.com from all other domains on the same virtual proxy server.
main-app-site.com is where users log in (currently via ajax) from client-site-a.com.
I have read and tried many things (iframe, js, PHP) to no avail.
Also, have add_header "Access-Control-Allow-Origin" "*"; set already, and that works fine when accessing main-app-site.com via AJAX from client-site-a.com
I would think since they have the same HOST & SERVER, the browser would share the cookie of that host/server, but that doesn't seem to be the case — or maybe I am missing an NGINX directive that I should add?
I have exhausted all I could learn and try.
Anything else I can try at this point?