All I want to get address bar URL, tried with this javascript, but shows as location{} (empty value)
var googleWindow = window.open('https://api.something/givetokenafterclosed');
var waitForToken = setInterval(function () {
console.log(googleWindow.location)
if (googleWindow.closed) {
clearInterval(waitForToken);
}
if (window.location.hash) {
// here I'm retrieving some token...
googleWindow.close();
}
}, 3000); // time interval set to 3 secs
If I open localhost urls It works fine. Help me to get opened window URL in above case.