WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. goodevilgenius
    Member
    Posted 1 year 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).

    http://wordpress.org/extend/plugins/wordpress-social-login/

  2. Miled
    Member
    Plugin Author

    Posted 1 year 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. goodevilgenius
    Member
    Posted 1 year 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. goodevilgenius
    Member
    Posted 1 year ago #

    So you know, the same problem occurs with Google.

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

  5. goodevilgenius
    Member
    Posted 1 year 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. goodevilgenius
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year ago #

    many thanks @goodevilgenius!

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

  8. side777
    Member
    Posted 1 year ago #

    EDIT:

    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

About this Topic