| Current Path : /home/hrpsychology/www/podcast/callback/ |
| Current File : /home/hrpsychology/www/podcast/callback/index.html |
<!DOCTYPE html>
<html>
<head>
<title>Authorization Callback</title>
<script>
// Extract the access token from the URL parameters
const accessToken = getAccessTokenFromUrl();
// Pass the access token to the main page
window.opener.postMessage({ accessToken: accessToken }, '*');
// Close the popup window
window.close();
// Function to extract the access token from URL parameters
function getAccessTokenFromUrl() {
const hashParams = {};
let e, r = /([^&;=]+)=?([^&;]*)/g,
q = window.location.hash.substring(1);
while (e = r.exec(q)) {
hashParams[e[1]] = decodeURIComponent(e[2]);
}
return hashParams.access_token;
}
</script>
</head>
<body>
<h1>Authorization Callback</h1>
<p>Please wait while we process your authorization...</p>
</body>
</html>