• Resolved mpjevacevic

    (@mpjevacevic)


    Hello,

    we have issue when user logs in it redirects them in same window and popup opens at the same time. I think this might be issue with CORS that can be seen in console.

    OAuth redirect uri proxy page is set to default /wp/wp-login.php, which is right. We even tried to create new page and set it up there but it was same.

    One thing we noticed, when social login was at our default wp login page (/wp/wp-login.php), login was working from there with no issues.

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @mpjevacevic

    I checked this problem on the linked site and the problem seems to be caused by your theme.
    Normally when you press our social button, that should open a popup but the parent page should not be redirected to the provider endpoint.
    In your case the problem happens, because your theme adds a click event listener to our buttons via this code:

    nLlk: function(e, t, n) {
            var i = n("KcJ+");
            function r(e, t, n, r) {
                return function(n) {
                    n.delegateTarget = i(n.target, t),
                    n.delegateTarget && r.call(e, n)
                }
            }
            e.exports = function(e, t, n, i, s) {
                var a = r.apply(this, arguments);
                return e.addEventListener(n, a, s),
                {
                    destroy: function() {
                        e.removeEventListener(n, a, s)
                    }
                }
            }
        }

    in this file:

    where you should replace “example.com” with your own domain name.
    And with those codes, they make our links being opened also when they are clicked.

    I can see that they target the “a” elements matching these selectors:
    “a:not([target=”_blank”]):not([href^=”#”]):not([href^=”mailto:”]):not([data-no-swup]):not(#guest-checkout):not(.tinvwl_add_to_wishlist_button):not([href*=”lista-zelja”]):not([href*=”kosarica”]):not([href*=”blagajna”]):not([href*=”/moj-racun/”]):not(.lmp_button):not(.cli_settings_button):not(.wt-cli-accept-all-btn):not(.cli-nav-link.cli-settings-mobile):not(.cli-privacy-readmore):not(.cli_setting_save_button):not(.ced_my_account_reorder)”
    and since we also use a elements, they catch us too.

    I can see that with those selectors they are trying not to target certain a tags. So to fix this problem, you should get in touch with the developers of your theme and ask them to exclude our buttons from their codes, too. Maybe adding this to their list:
    :not([href*=”loginSocial”])
    will fix the problem.

    Best regards,
    Laszlo.

    Thread Starter mpjevacevic

    (@mpjevacevic)

    Hi,

    that js click listener was the problem, added exception like you said and the issue was resolved, thank you very much.

    Best regards,
    Milan

    Plugin Support Laszlo

    (@laszloszalvak)

    Hi @mpjevacevic

    Thank you for your feedback! I am glad adding that exception solved the problem!

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CORS policy blocking?’ is closed to new replies.