Allow cross domain Single Sign-on on multisite

I had Domain Mapping but deactivate it due to an issue with wildcard SSL certificate. And use the built-in WordPress mapping option.

The issue is when user login to main site, they're not automatically logged in to the other sites. Which make it impossible to comment on the mapped subsites.

For example, if user is logged in to example.com, they need to login again to example.org to have access. While they still have access the the non-mapped subsites(like site1.example.com).

The question is, how can I force Single sign-on for all the domain and mapped one?

  • Ash

    Hello jcnjr

    When you use default domain mapping in wordpress multisite, then single sign on won't work, there is not much we can do here, I am afraid :slight_frown:

    I had Domain Mapping but deactivate it due to an issue with wildcard SSL certificate.

    About the original issue you were having with our domain mapping plugin, would you please let me know more details about it so that we can try to fix that and if we can, then you don't need to use he default mapping option?

    Let us know please.

    Have a nice day!

    Cheers,
    Ash

  • jcnjr

    Thank you for the prompt reply Ash. This is seriously unfortunate to hear.

    Since Domain Mapping had functionality built in to log users into all sites, perhaps might WPMU Dev consider developing a more simple plugin just to address the single sign-on issue for WP native domain mapping.

    There is apparently a widely known conflict with WPMUDev Domain Mapping and Really Simple SSL Pro Multisite as described here:

    https://catapultthemes.com/redirect-issue-with-really-simple-ssl-and-multisite/

    With Domain Mapping activated, we also encountered an infinite redirect loop when attempting to log in to site dashboards. Most common symptoms: the login screen would appear again after signing in, or nothing would happen when clicking Submit on signup form.

    Regardless, I need to get this sorted out. I'll gladly go back to using the Domain Mapping plugin if I can get help resolving the redirect issue.

    And FYI: The log-in issue was only noticed after activating Hummingbird, which was done shortly after implementing SSL. Any chance that could be causing the problem?

    Thanks again!

  • jcnjr

    The log-in issue was only noticed after activating Hummingbird

    Regarding Hummingbird...

    Would Hummingbird speed up any delay that may have been causing the redirect loop?

    I'm wondering if now that Humming bird is active, response may be quicker, resolving the loop, but I am not exactly certain how HB comes into play for the dashboard and log-in pages.

    Reverting to the Domain Mapping plugin is time consuming and interrupts service while DNS propagates, so I'm just looking for feedback before doing so.

    Thanks.

  • jcnjr

    Ash

    Thank you for your help in getting this resolved.

    Since you suggest that Domain Mapping is the only way to provide a single sign-on for all sites, I have once again network-activated that plugin and configured the settings as they were before.

    Users are still not able to remain logged in when visiting the mapped domain site. Since we only have a couple admins, I'll deal with the redirect loop issue later if that persists. I did already encounter it when trying to log into the mapped domain /wp-admin.

    So, we are back where we started, even with the Domain Mapping plugin method to map domain.

    CURRENT STATUS:
    1. User logs into tripawds.com.
    2. User visits tripawds.org (mapped via plugin to 501c3.tripawds.com)
    3. User is logged out and cannot comment on posts without providing email

    CURRENT CONFIG:
    1. Domain Mapping network-activated
    2. sunrise.php moved to /wp-content
    3. sunrise defined ON in wp-config
    4. SiteURL reset to 501c3.tripawds.com
    5. tripawds.org Domain added to Mapping tab on subsite
    6. Domain health is "Valid"
    7. Domain is pointed to same Name Server of Host (root domain) at Registrar
    8. Add-On Domain created via cPanel for tripawds.org
    9. Network Setting: Cross-domain autologin set to Yes
    10. Load Cross-domain autologin asynchronously box is checked
    11. Administration mapping and Log-in mapping both set to domain entered by the user

    This is the way we had it working before attempting the native domain mapping method.

    Where do we go from here???

  • jcnjr

    FYI: Thinking this may have been waiting on DNS propagation, I waited and have now confirmed the issue persist.

    Also confirmed the redirect loop persists when attempting to load the mapped.domain/wp-admin now that Domain Mapping is active again. If I visit tripawds.org/wp-admin the URL changes to /wp-login.php?... but nothing ever displayes because the page just keeps reloading again, and again and again, and...

    Any suggestions for getting this sorted out is greatly appreciated.

    #1 priority is to get the cross domain log-in working again for all users.

    For now, admins can visit the dashboard via the unmapped admin URL.

  • Ash

    Hello jcnjr

    Thanks a lot for detailed comments.

    When you activated domain mapping plugin again, did you remove the mapped domains from Network Admin > Sites > Edit a site and added them in subsite admin > Tools > Domain Mapping?

    Also, would you please enable support access so that I can check? Please follow this article to enable support access: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Have a nice day!

    Cheers,
    Ash

  • jcnjr

    Ash said:

    did you remove the mapped domains from Network Admin

    Thanks for checking in.

    Yes, I did edit the site from Network Admin -> Sites to restore the subdomain (501c3.tripawds.com) as the Site Url.

    I have also just deleted the mapped domain (tripawds.org) from Network Admin -> Settings -> Domain Mapping for the site 501c3.tripawds.com. I then attempted to add the mapped domain (tripawds.org) again from the subsite (501c3.tripawds.com) Admin -> Tools -> Domain Mapping but now get the attached DNS error. So now we are stuck with the unmapped an unavailable site! <sigh> So now our Foundation site is offline, eventually redirecting to the primary domain.

    I'm hoping this is temporary, and will continue trying to remap the domain.

    Support Access has been granted again.

  • Ash

    When you activate Domain Mapping plugin, you must move the sunrise.php file in the proper place and set the define in wp-config.php as per the instruction in domain mapping page:

    Please copy the sunrise.php from your plugin folder /home/tripawds/public_html/wp-content/plugins/domain-mapping/sunrise.php into /home/tripawds/public_html/wp-content/sunrise.php.
    In your /home/tripawds/public_html/wp-config.php file please uncomment or add (if not available) the following code: define( 'SUNRISE', 'on' );

    So, move the sunrise.php from your plugin folder /home/tripawds/public_html/wp-content/plugins/domain-mapping/sunrise.php into /home/tripawds/public_html/wp-content/sunrise.php

    And add the following line in wp-config.php before "/*That's all.....*/" message

    define( 'SUNRISE', 'on' );

    Let us know how it goes. Have a nice day!

    Cheers,
    Ash

  • jcnjr

    Ash
    said

    you must move the sunrise.php file in the proper place and set the define in wp-config.php

    I know, I have done all that.

    I have had to revert to the native WP domain mapping method, after attempting the plugin again resulting in the mapped sites being offline far too long. I will open this ticket backup if I ever try again, and will hope that WordPress builds in some sort of cross domain cookie magic since they have added the mapping option...why this option hasn't been added yet baffles me, since it can clearly be done with the plugin.

    Thanks anyway.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.