• In WordPress multisite, account registration is done via wp-signup.php page, not wp-login.php page. But, from the plugin settings, there is no information about integration into wp-signup page, it is only for wp-login page. On wp-login.php, in multisite, Register link leads to wp-signup.php.

    1. How the plugin integration in multisite works anyway? I need to have social buttons on wp-signup for users to create new accounts, and on wp-login for users to login with social buttons.
    2. What if I only have wp-login Login integration, what happens on multisite, if user doesn’t have an account and tries to use social login, will that create an account on the multisite or not?

    Milan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @gdragon

    When you work with a multi site, each site has its own database, thus on each site, you need to configure Nextend Social Login accordingly ( you need to add the redirect URI of each subsite to the App that you create, then you need to insert the credentials into our providers , verify the settings and enable the providers. ).

    And in tne case of Nextend Social Login, the same set of social buttons are used for both registration and login. So whenever you press the social buttons, it will either try to register a new account or log the user in to an existing account ( if we managed to find an existing account that’s email address matches with the email address returned by the provider, or if the social media account is already linked to the WordPress account ).

    So we don’t use the wp-signup.php at all, as that way the subsite where the user actually connects wouldn’t be respected, but it was as if the registration happened always on the site associated with the /wp-signup.php.

    Instead we use the /wp-login.php page of the subsite where the login was initiated, for both handling the OAuth flow and the Register flow, and this way when we register the user the user will show up in the user’s table of the subsite where the user connected with social login. ( Of course the person will be able to login to the other subsites, too as the user is inserted into the the Network users table as well. )

    Of course if you want to display the social buttons in the wp-signup.php page as well, then you can do that, by hooking a custom function to one of the actions that the wp-sugnup.php fires, e.g.:

    • before_signup_form
    • after_signup_form

    and output our social buttons with the shortcode, via the do_shortcode() function of WordPress. In the documentation below you can learn more about our shortcode:

    but whether you do this or not. Users will still be able to register with Nextend Social Login on the /wp-login.php pages, too unless you set the “Membership” setting of Nextend Social Login ( Nextend Social Login> Global Settings > General tab ) on the corresponding multisite. This way the user will be informed about that the registration is disabled. If you want to give the user a more informative error message, you can use the “nsl_disabled_register_error_message” filter to modify the error message, and you can also use the “nsl_disabled_register_redirect_url” filter if you want to redirect the users to another page, e.g. your wp-sugnup.php page. In our developer documentation you can learn more about these filters:

    Best regards,
    Laszlo.

    Thread Starter Milan Petrovic

    (@gdragon)

    Hey @laszloszalvak , thanks for the quick reply!

    So, my current workflow is that I do have a multisite, but all the login is done only on one subdomain of the multisite network, and all other websites in the network redirect login to that one website, so that makes it easier to handle social login, as I need it on one website in the network only.

    If I display the login form and integrate social login buttons into it, users can click on the Social Login buttons, and two things can happen: if they have an account, they will be logged in; if they don’t have an account, the Nextend plugin will create a new user account, but it will associate that account only on the website in the network where the login has happened.

    And, I can hook into user registration, and associate that user account with other websites in the network.

    Milan

    Plugin Support Laszlo

    (@laszloszalvak)

    @gdragon

    Based on what you described in the first section:

    all the login is done only on one subdomain of the multisite network, and all other websites in the network redirect login to that one website

    I think you probably don’t even need social login on the rest of the subsites, right?. Since in this case, you should configure Nextend Social Login only for that subsite, where you normally handle the registration and login ( via the traditional login and registration forms ). On the rest of the subsites, your custom login links should point to that site, as well. This way we will display the social buttons only on 1 particular site.

    Of course if you would like to give your visitors an option to login on the other subsites, too then the approach of disabling our Membership setting on those subsites – like I mentioned aboive – could work for you. That way people could register only on 1 subsite ( where you have the Membership of Nextend Social Login enabled ) and on the rest they could use the social login just for login purposes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multisite Signup Integration’ is closed to new replies.