Set Login Cookie for Multiple Domains

Hi,

I am having a bit trouble configuring the Domain Mapping plugin to the settings we require for our Multisite network. Basically, I need to make sure the logged in user’s session cookie is set for two domains:

1. https://dashboard.ourdomain.com/wp-admin

2. https://customer-domain.com/

Basically this will allow users to access their admin pages via our dashboard, but will allow them to do inline edits with a visual page builder while viewing their webpage. We were able to do this no problem with the WordPress MU Domain Mapping plugin but we would prefer to use your plugin.

Thank you.

  • Patrick Cohen
    • Technical Docs Wrangler

    Hi again Rick

    I logged into your site with the provided test user credentials and see the same behavior you have described, regardless of Domain Mapping settings.

    I’m thinking now that something in the BeaverBuilder isn’t playing nice with Domain Mapping. I’ll see if I get a recent copy of that builder to do some testing on a fresh sub-directory sandbox site I’ll set up.

  • Patrick Cohen
    • Technical Docs Wrangler

    Rick

    Whoa! Yeah, I get a 503 error or “The page isn’t redirecting properly” anytime I try to load a wp-admin page, including support access. :slight_frown:

    Please deactivate the Domain Mapping plugin via FTP. Go into your wp-content/plugins folder, and rename the domain-mapping folder to anything else, like DISABLED-domain-mapping.

    If we can once again access your wp-admin, that will at least tell us if something that was changed in the plugin messed stuff up. I’m 99% sure I left everything the way it was on my last visit.

    Once back in, you can rename the plugin folder back to domain-mapping via FTP, and reactivate on your site to double-check the settings.

  • Rick
    • Design Lord, Child of Thor

    Hi Patrick,

    Looks like it was an error on my web-host’s side of things… they changed out a module for PHP-FPM and it broke some things. Anyway we’re back online and back to the original issue at hand… what do you suggest we look at to get the domain login working?

    Rick

  • Rick
    • Design Lord, Child of Thor

    Patrick,

    Is there possibly a way we can disable Domain Mapping for logged in users? Then we can launch the page builder from the same domain as the wp-admin, while allowing general users to see the mapped domain.

    Rick

  • Patrick Cohen
    • Technical Docs Wrangler

    Hi again Rick

    I hope you had a great weekend!

    I finally got around to installing BeaverBuilder and now see the editing features on the front-end, which I did not see on your site.

    I’ve just now purchased a new domain name to map too, as there was something funky going on with the DNS of the one I was trying to test with over the weekend… doesn’t hurt to have an extra name lying around. :slight_smile:

    But now I’ve gotta wait for the darned DNS to resolve on that one; could be anywhere from 15 minutes to 72 hours.

  • Rick
    • Design Lord, Child of Thor

    Hi Patrick,

    I'm a little skeptical that it is the BB plugin causing the issue. Speaking to their team as well, and they have been testing their plugin to make sure it is compatible with yours.

    Digging deeper, it does not look like the cookie is set on the mapped domain. Using Chrome's inspector I was able to see the Cookie set for the WP Admin page, but that same cookie is not set when viewing the domain name mapped to the user's account… I would have expected to see a cookie set there as well. Looks like the mapped domain is not logged in which is probably causing the issue. See the attached screenshots.

  • Patrick Cohen
    • Technical Docs Wrangler

    Hi again Rick

    After some testing, I would tend to agree that is likely not the Builder that is the issue here.

    I’ve been trying to get to the bottom of this these last few days, but haven’t been able to fully test on my own install (DNS is being very wonky at my host, which doesn’t help matters).

    I was able to test on a colleague’s install, and the cross-domain auto-login appeared to work as expected. However, it was not https, so couldn’t really dig into things.

    I have also discussed this with Domain Mapping developer who will be looking into the issue as soon as he can. He has several projects on his plate, but this sounds very similar to an issue that has already been tasked.

    Can you please confirm if cross-domain auto-login is working or not for the wp-admin of the user’s subsite? Meaning…

    https://dashboard.yourdomain.com/wp-admin

    and https://yourdomain.com/subsite/wp-admin