WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Social Login
Relative URL and internal server port fix (3 posts)

  1. flxfxp
    Member
    Posted 1 year ago #

    This plugin is failing for me because of two reasons:

    * plugins_url() turns up empty, which causes redirect_uri problems with services as it doesnt return a fully qualified url. This has to do because I'm using the Roots theme, which rewrites plugin urls.

    * it tries to redirect to my internal server port (running nginx internally on port 8080, varnish externally on port 80)

    To fix problem 1, I had to make sure it has the fully qualified urls:
    wp-social-plugin (around line 66):
    define( 'WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL', site_url() . '/plugins/' . basename( dirname( __FILE__ ) ) );
    define( 'WORDPRESS_SOCIAL_LOGIN_HYBRIDAUTH_ENDPOINT_URL', WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . '/hybridauth/' );

    services/authenticate.php (around line 80):
    $config["base_url"] = site_url() . '/plugins/wordpress-social-login/hybridauth/';

    To fix problem, I needed to ensure that it doesn't rely on my internal port number:
    hybridauth/Hybrid/Auth.php (around line 388-394):
    // use port if non default
    /* $url .=
    isset( $_SERVER['SERVER_PORT'] )
    &&( ($protocol === 'http://' && $_SERVER['SERVER_PORT'] != 80) || ($protocol === 'https://' && $_SERVER['SERVER_PORT'] != 443) )
    ? ':' . $_SERVER['SERVER_PORT']
    : '';
    */
    Just putting this out there for people with probs :)

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

  2. Martin
    Member
    Posted 9 months ago #

    Does this apply to the current version?
    I wasn't able to find services/authenticate.php
    and the hybridauth/Hybrid/Auth.php code looks kinda wrong too.

  3. mech422
    Member
    Posted 9 months ago #

    Commenting out the code in hybridauth/Hybrid/Auth.php worked for me with the current release.

    Alternatively, you could rewrite url's in your proxy/cache...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.