Files
SkyArtShop/website/admin/test-logout-simple.html

40 lines
1.2 KiB
HTML
Raw Normal View History

2025-12-19 20:44:46 -06:00
<!DOCTYPE html>
<html>
<head>
<title>Logout Test</title>
2026-01-19 01:17:43 -06:00
<link rel="icon" type="image/png" href="/admin/favicon.png" />
2025-12-19 20:44:46 -06:00
<script src="/admin/js/auth.js"></script>
</head>
<body>
<h1>Simple Logout Test</h1>
<button onclick="testLogout()">Test Logout</button>
<div id="output"></div>
<script>
function log(msg) {
const output = document.getElementById('output');
output.innerHTML += msg + '<br>';
console.log(msg);
}
async function testLogout() {
log('Starting logout test...');
log('typeof window.logout: ' + typeof window.logout);
log('typeof logout: ' + typeof logout);
if (typeof window.logout === 'function') {
log('Calling window.logout(true)...');
try {
await window.logout(true);
log('Logout succeeded!');
} catch (err) {
log('Logout error: ' + err.message);
}
} else {
log('ERROR: window.logout is not a function!');
}
}
</script>
</body>
</html>