• 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 === ‘https://’ && $_SERVER[‘SERVER_PORT’] != 80) || ($protocol === ‘https://’ && $_SERVER[‘SERVER_PORT’] != 443) )
    ? ‘:’ . $_SERVER[‘SERVER_PORT’]
    : ”;
    */
    Just putting this out there for people with probs ??

    https://www.ads-software.com/extend/plugins/wordpress-social-login/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Relative URL and internal server port fix’ is closed to new replies.