Skip to content

Commit a9646f6

Browse files
authored
Update account.html
1 parent 1d921f5 commit a9646f6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

account.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@
5050
window.location.href = authUrl;
5151
}, 2000);
5252
}
53+
// Simulate checking if the user is logged in
54+
function checkAuth() {
55+
const urlParams = new URLSearchParams(window.location.search);
56+
const authSuccess = urlParams.get('success'); // Example: Scratch Auth might return '?success=true'
57+
58+
if (authSuccess === 'true') {
59+
// Redirect to index.html if login was successful
60+
window.location.href = 'index.html';
61+
}
62+
}
63+
64+
// Run this check when the page loads
65+
window.onload = checkAuth;
5366
</script>
5467
</head>
5568
<body>

0 commit comments

Comments
 (0)