CROSS DOMAIN AUTO LOGIN IS NOT WORKING

I have a multi site installation on wpengine and have approx 100 of sites in a network. Allsites pointing to a different domain using domain mapping plugin andits working ok.

But I want a functionality if any user is logged into to any of my site it should be auto loggedin to all sites in that network but it seems that CROSS DOMAIN AUTO LOGIN IS NOT WORKING is not working.

I have granted you support access.

thanks

  • Jude

    Hey Sean

    Hope all is well with you and welcome to the community !

    If you have DOMAIN_CURRENT_SITE or COOKIE_DOMAIN defined in your wp-config file, comment those out as they can cause issues.

    Also this is how the feature is supposed to work as per a discussion our CTO had here. If you login to a mapped domain, you will receive cookies for just that domain. If you login on the root domain, it will loop through the "my sites" (sites your user has a role for) and set a logged in cookie for each. Note this is limited though, only a certain number of cookies can be set this way and avoid an error.

    Also when it sets cookies for the mapped domains, it only does this for the admin side currently, so you won't look logged in on the frontend.

    Can you quickly confirm if its the front end or the whole site that does not work ?

    Cheers
    Jude

  • Luís

    Hi Sean ,

    Hope you're doing well today!

    From what I tested, it can be an cookie issue, but also and SSL related issue too.

    I think you are not using an Wildcard SSL, right? I am saying this because you are mapping your subsites from HTTP to HTTPS:

    http://subsite.mydomain.com -> https://mappeddomain.com

    So, In this case, from what I tested and as all your mapped domains are using HTTPS, to avoid an SSL error in the admin pages (Your connection to this site is not private), I think you should use this configuration in network admin -> Settings -> Domain Mapping:

    1) Use the Mapped domain (where you have the SSL) in the Login and Administration pages:

    2) Force the HTTPS on the login and administration pages:

    Can you try this, please?

    Cheers, Luís

  • Jude

    Hey Sean

    You can see our CTO clarifying here that this may not be possible.

    If you login to a mapped domain, you will receive cookies for just that domain. If you login on the root domain, it will loop through the "my sites" (sites your user has a role for) and set a logged in cookie for each. Note this is limited though, only a certain number of cookies can be set this way and avoid an error.

    Also when it sets cookies for the mapped domains, it only does this for the admin side currently, so you won't look logged in on the frontend.

    Hope that clarifies

    Cheers
    Jude

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.