#_=_ appends on redirect node code example
Example 1: Why is #_=_ appended to the redirect URI? passport facebook
$(window).on('load', function(e){
if (window.location.hash == '#_=_') {
window.location.hash = ''; // for older browsers, leaves a # behind
history.pushState('', document.title, window.location.pathname); // nice and clean
e.preventDefault(); // no page reload
}
})
Example 2: Why is #_=_ appended to the redirect URI? passport facebook
//If #_=_ was appended to the URL:
if(location.hash == '#_=_'){
//Store the "clean" URL in a variable
var cleanURL = location.href.split('#')[0];
//Set the URL to the "clean" URL
location.replace(cleanURL);
};