• Resolved bobolinps

    (@bobolinps)


    Hi,

    The plugin is great but I have a problem with the social login options.

    When trying to authorize whether to Facebook, Twitter, etc. there is a endless loop with redirects between the site and the corresponding social network.

    A review of the logs shows that countless 302 redirects are made until the server disconnects due to the large number of redirects.

    An excerpt from the web server logs looks like this (a huge number of consecutive lines repeating in just a few seconds):

    "GET /wp-json/anycomment/v1/auth/facebook?code=...&state=... HTTP/1.1" 302 5 "https://mysite.com/article-name/"

    Do you have any idea what this could be due to and how it can be fixed?

    Thanks!

    • This topic was modified 4 years, 4 months ago by bobolinps.
    • This topic was modified 4 years, 4 months ago by bobolinps.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bobolinps

    (@bobolinps)

    Please ignore the above. The problem turned out to be due to a configuration in the Varnish Cache Server and is not related to your plugin.

    Plugin Author Alexander

    (@ateshabaev)

    Hello,
    Sorry for late reply and good that you were able to fixed it.

    Thank you for letting us know how to fix it, it can useful for somebody else ??

    Thread Starter bobolinps

    (@bobolinps)

    If your server uses Varnish Cache Server to cache content, then social networks login (Facebook, Twitter, etc.) will work if the default.vcl on your Varnish Cache Server contains the following rules:

    In the vcl_recv subroutine:

    # Exclude (DO NOT cache) everything related to the backed
    if (req.url ~ "(wp-json)") {
    	return (pass);
    }

    In the vcl_backend_response subroutine:

    # Only allow cookies to be set if we're in admin area or through REST API
    if (beresp.http.Set-Cookie && bereq.url !~ "^/wp-(login|admin|json)") {
    	unset beresp.http.Set-Cookie;
    }

    as here the key part concerning AnyComment plugin is of course wp-json.

    • This reply was modified 4 years, 4 months ago by bobolinps.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issue with the social logins’ is closed to new replies.