I understand that, if I use subdomains on a multisite, then WordPress has the built in function of keeping the users logged in.
The different domains are a must. These sites were set up using the built in "add a new site" feature of WordPress. (I did not use a plugin to set up the sites.) The sites work fine as they are, except I would like for a user who signs into abc.com be able to switch to def.com to still be logged in.
I have tried
adding define('COOKIE_DOMAIN', ''); to my wp-config file.
Also I've tried.
define('ADMIN_COOKIE_PATH', '/'); define('COOKIE_DOMAIN', ''); define('COOKIEPATH', ''); define('SITECOOKIEPATH', '');
and I've tried changing
define('SUBDOMAIN_INSTALL', true); between
false. I've tried as many variations of the above as I can think of. The only other solution I've seen mentioned was a SSO plugin which would allow users to use their google or Facebook logins to sign in, but we are not comfortable with this option.
(A note: When I looked this issue up, some people were getting error messages about cookies not working/not being allowed and I have not noticed any error messages to that effect.)