Support » Plugin: WordPress Social Login » Varnish and WSL anyone?

  • I get a ‘You cannot access this page directly.’ directly after connecting with a Social Network.

    From what I can gather, it has to do with running the Varnish proxy.

    Has anyone been able to use this plugin and Varnish?
    Any clues in what needs to change for it to work?

    Any help really would be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ran into this myself today. Here’s a fix that works.

    The default.vcl script is most likely removing cookies needed for social login to work. Skip caching of anything passed to a URL that starts with

    Here’s what I have:

    sub vcl_recv {
        # lines skipped here
        # Do not cache these paths
        if (req.url ~ "^/wp-cron\.php$" ||
            req.url ~ "^/xmlrpc\.php$" ||
            req.url ~ "^/wp-admin/.*$" ||
            req.url ~ "^/wp-includes/.*$" ||
            # Allow WP Social login to bypass Varnish cache
            req.url ~ "^/wp-content/plugins/wordpress-social-login/hybridauth/\?" ||
            req.url ~ "\?s=") {
                return (pass);
        # Define the default grace period to serve cached content
        set req.grace = 6h;
        # By ignoring any other cookies, it is now ok to get a page
        unset req.http.Cookie;
        return (lookup);

    Hope it helps.

    Thanks for the reply, Boris.
    As it turns out, I ditched Varnish and went with Nginx, memcached, php-fpm 5.5 and W3total Cache, for my situation and sites. A lot less issues and lots faster for my sites.
    Thanks again though and hope it helps someone else

    My varnish config was stripping cookies so i had to make another mod in addition to this one.
    in the vcl_hash section I had to include the following

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Varnish and WSL anyone?’ is closed to new replies.