<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script>
        var url=window.location.href;
        //alert(window.location.href);
        var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
      token = hash.split("&")[0].split("=")[1];
      alert(token);

    var xhr = new XMLHttpRequest();
    xhr.open('POST', "http://localhost/save_token", false);
    xhr.setRequestHeader('Content-type', 'application/json');
    xhr.send(JSON.stringify({"token":token}));

    </script>
</head>
<body>
<p>{{ token }}</p>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script>
        var url=window.location.href;
        //alert(window.location.href);
        var hash = window.location.hash.substring(1); //Puts hash in variable, and removes the # character
      token = hash.split("&")[0].split("=")[1];
      //alert(token);

    var xhr = new XMLHttpRequest();
    xhr.open('POST', "http://localhost/save_token", false);
    xhr.setRequestHeader('Content-type', 'application/json');
    xhr.send(JSON.stringify({"token":token}));

    </script>
</head>
<body>
<p>{{ token }}</p>
</body>
</html>

Remove alerting token value on login
Remove alerting token value on login
