rakesh.r1024 0 Newbie Poster

I have enabled the Facebook re-authentication for my site (done in codeigniter) when the user is visiting a specific page. Here is my code :

$(window).load(function() {
    $("a.facebook_reauth_login").on("click", function(e) { 
        var t = $(this);
        e.preventDefault();
        FB.usingButton = !0;
        var n = base_url;
        FB.login(function(e) { 
            if (e.authResponse) {
                FB.api("/me", function(e) {
                    var t = n + "fbreauth";
                    $.ajax({
                        type: "POST",
                        data: $.param(e),
                        url: t,
                        dataType: "html",
                        success: function(e) { console.log(e);

                        },
                        error: function() {
                            alert("Some error occurred,please try after some time!")
                        }
                    })
                })
            } else {
                alert("User cancelled login or did not fully authorize.")
            }
        }, { auth_type: 'reauthenticate' });
        return false
    })
});

Now the problem is that the e.authResponse is returning true even if the user dismisses the re-authentication popup without entering the password. How do I verify that the user has entered the password?