<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
function change(){
    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>
AuthUri opens a new window. In new window when I click on allow, I will be redirected to a new window, How to get the last redirected url ?
 
     
     
    