<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
function updateRedirectURL(){
var clientID = "hgffgh";
var clientSecret = "fgfhgfh";
var callbackUri = "https://login.live.com/oauth20_desktop.srf";
var tokenUri = "https://www.box.com/api/oauth2/token";
var authUri = "https://www.box.com/api/oauth2/authorize?"+
"client_id="+clientID+
"&response_type=code"+
"&redirect_uri="+callbackUri
//var web = window.open(authUri);
//console.log(web.location.href);
var win = window.open(authUri, "windowname1", 'width=800, height=600');
//alert(win)
}
</script>
After clicking on allow in the newly opened window, how can I retrieve the URL of the final redirection?