WordPress Social Login
Twitter partially broken for multisite with domain mapping (8 posts)

  1. Dan Jones
    Posted 3 years ago #

    I have a multisite installation with Domain Mapping.

    I have the site http://goodevilgenius.blogs.goodevilgenius.org/ mapped to http://goodevilgenius.org/

    Generally this works fine, however it seems to break the Twitter login with the WP Social Login. If I log in via Twitter, it redirects to the admin page. I'm logged in, but not back on the post I came from. I've tried using both http://goodevilgenius.blogs.goodevilgenius.org/ and http://goodevilgenius.org/ as the callback URL.

    If I use the plugin with a non-mapped site, Twitter login works fine. Facebook login also works fine (haven't tried others).


  2. Miled
    Plugin Author

    Posted 3 years ago #

    to be honest I have no clue how this "multisite" even works.. when writing wsl, I took into account some recommendations I read about the subject here and there, but I never tested it due to how lazy/busy I am.

    On another note I found that you are a developer, so if you could fix that it would be amazingly awesome!

  3. Dan Jones
    Posted 3 years ago #

    If I can find the time, I'll have a look at it. I know the WP Super Cache plugin has a "Domain Mapping" feature to make it work with Multisites that use Domain Mapping, so maybe I can use some of that code to get WSL Twitter login to work. There's got to be some trickery with the callback URL, or something.

    But to be honest, I doubt I'll find the time. It's just not that important to me. It would be nice to have, but unless I can justify it as something important for work (which maybe I can), I doubt I'll be able to get around to looking at it.

  4. Dan Jones
    Posted 3 years ago #

    So you know, the same problem occurs with Google.

    I'm guessing any that require a callback URI will have this problem.

  5. Dan Jones
    Posted 3 years ago #

    With a little more testing, I've figured out that the problem actually occurs on any login, but only if logging in from the comment section. If I log in via the main login page, it always redirects back to the homepage, as I would expect.

  6. Dan Jones
    Posted 3 years ago #

    I figured out how to fix it, but I don't know if it would break other things.

    In wsl.authentication.php, if I comment out the code:

    if( get_option( 'wsl_settings_redirect_url' ) != site_url() ){
                    $redirect_to = get_option( 'wsl_settings_redirect_url' );

    it works for me.

  7. Miled
    Plugin Author

    Posted 3 years ago #

    many thanks @goodevilgenius!

    I guess I'll take it from there and attempt to find a workaround for this issue.

  8. side777
    Posted 3 years ago #


    ok, i just fixed it. always use plugins_url() in plugins instead of the wp constant WP_PLUGIN_URL. i changed this in wp-social-login.php and it's working fine... :)

    (background: WP_PLUGIN_URL keeps the unmapped url, plugins_url() returns the mapped one we need here.)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Social Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic