I would like a single login for subsite and buddypress site

I have a multisite where I am using BuddyPress for xProfile fields. I would like the user to not have to login a second time to access their Profile on the BP community site. I understand that you would not want single login across the network but it seems there should be a way to be logged into both the user's site and BuddyPress at the same time. Any suggestions?

  • Milan

    Hello @antKat,

    I hope you are having a good day and thanks for asking us. :slight_smile:

    Dear member I must admit I am not able to grasp your question fully. Can you tell me step by step explanation of scenario which you want see in action ?

    I've tried understanding your issue context by installing Buddypress on Main network installation and tried logging in to your main site and accessed Buddypress profile panel. Same thing I did with subsite user too. I added user via subsite admin panel, logged into site through subsite and still I was able to access all the functionality of Buddypress profile panel.

    Cheers,
    Milan

  • antKat

    Hi Milan, Thanks for your response. This is our setup: Multisite (subdomain structure) with BuddyPress installed on a subsite (6).
    What we are experiencing is that when a user/site is created via sign-up and they log into their subsite, the BP admin profile menus are on the upper right bar. When they select to edit their profile, they are required to login again. From the user's perspective, they do not realize that their Profile is actually on a different site (BP) so it is not a good user experience. I would like to have a single signon that logs the user into both their site and the BP site at the same time.

  • antKat

    milan, I can access to view the Profile page but cannot edit it without re-logging in. And for some reason, it requires 2 attempts to sucessfully login to the BuddyPress site.

    Note. We also have the domain mapping plugin running with the cross domain auto login checked.
    Does this feature work for all sites on the network or only those sites that are domain mapped?

    This is a very awkward situation so I truly hope that you can find a solution.

  • Adam Czajczyk

    Hello antKat,

    I hope you're having a nice day and thank you for an additional explanation!

    I understand from your posts that you would like users of your sub-sites to be able to login to those sub-sites and at the same time be logged in "automagically" to the BuddyPress that set on one of the sub-sites.

    The difficulty here is that a user of one of the sub-sites in Multisite installation does not automatically become a user of another sub-site and BuddyPress does not use login/accounts "separate" from WP core. Therefore, although there are profiles, in order to be able to log-in users of sub-sites other than the one that runs BuddyPress should also be users of that sub-site. That's the first factor.

    That said, I assume this is not the main issue here. As you said, users are able to access their profiles but they only need to login again. Therefore we're at the "cross-site" login stage. Domain Mapping's "cross-domain autologin" feature will log-in users across all mapped domains (mapped by super-admin or by admins of sub-site), yet some sub-sites may not use mapped domains at all. Also, if some sub-sites are running over SSL (HTTPS) that feature may not work due to some limitations carried by modern browsers ("cross domain cookies security" issue).

    That all said, could you please confirm that users of all sub-sites are also users of that sub-site where BuddyPress is installed and let me know about SSL on your network? I hope I'll then be able to find a solution for you.

    Also, please correct me if I understood you goal wrong.

    Best regards,
    Adam

  • antKat

    Hi Adam,
    Thank you for your help here.
    1. We are using "Join My Multisite" on the Community site, so I assume that is solving the user issue.
    2. We are using SSL on the network. We have a wildcard SSL that covers all of our non mapped sites and we also use Cloudflare to facilitate the SSL support for the mapped sites.
    3. It is very strange in the current state that the first attempt to login to the BP site is never successful and you need to submit the same login credentials a second time to have a successful login.

    We have a similar set up at usingessentialoils.com (except that we are not using BP) but I recall initially having to deal with the re-login required to access the account page (main site) and somehow that issue was fixed there. Again, it doesn't have BP but it does have the same SSL and Cloudflare set up.

  • Adam Czajczyk

    Hello antKat!

    I think I've got a clear picture of the issue so we're on the same side now :slight_smile: I'm not able however to replicate your setup on my sandbox easily and I'd like to test that out for myself. Would you mind granting me a support access to your site via our WPMU DEV Dashboard plugin? Here's a guide on this:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,
    Adam

  • Adam Czajczyk

    Hello antKat,

    Thank you for granting access!

    I've signup for a new site (using different browser, no admin access) right up from a signup link from you main site. After I went through an entire process I was given a new site and the BuddyPress profile links were made available for me as expected.

    I then checked your #6 site (where the BuddyPress is) and I've noticed that I was not given a user account there.I was able to access my BuddyPress profile and also edit it. You can see that I did it as I did not remove my site and profile yet.

    I didn't have to login again to that site as I was already initially logged in. After I logged out and logged in to my new site, I was however asked to login again when trying to access my profile. That's despite the fact that I was now automatically added as a user to that "BuddyPress site".

    The bottom line is, I can fully confirm the issue. I've then then reviewed your setup. There's a "cross domain" login option enabled for both Domain Mapping and Mult-Domains plugins but this will not affect sub-domains of the same domain. I think an additional "Single Sign On" feature would be necessary here however I'm not exactly sure how it will play with SSL (there're often issues with "cross-domain" cookies over SSL connection).

    This plugin may be worth checking out:

    https://wordpress.org/plugins/wp-multisite-sso/

    Having said that, I remember what you said in your initial post that you may not quite want to have a "single sign on" over all sub-sites but that would be at least a good point to start with if this would work for you (I suppose it would be possible to limit plugin functionality).

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.