The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. flxfxp
    Posted 3 years 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__ ) ) );

    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 :)


  2. Martin
    Posted 2 years 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
    Posted 2 years 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

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

About this Topic


No tags yet.