Skip to content

Commit 923f9f6

Browse files
authored
Update account.html
1 parent 928b669 commit 923f9f6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

account.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@
7070
}
7171
</style>
7272
<script>
73-
const secretCode = '972';
73+
// Generate a random 3-digit number
74+
function generateThreeDigitCode() {
75+
return Math.floor(100 + Math.random() * 900);
76+
}
77+
78+
const secretCode = generateThreeDigitCode();
7479

7580
// Generate a key by shifting the baseKey based on the secret code
7681
function generateKeyFromCode(code) {
@@ -161,7 +166,7 @@
161166
const messageBox = document.getElementById("apiMessage");
162167
const redirectLocation = encodeURIComponent(window.location.href);
163168

164-
const authUrl = `https://ubbload.netlify.app/login?redirect=${redirectLocation}`;
169+
const authUrl = `https://ubbload.netlify.app/login?redirect=${redirectLocation}&code=${secretCode}`;
165170

166171
messageBox.style.color = "green";
167172
messageBox.textContent = "Redirecting to APIAuth login (ubbload)... Follow the steps there.";

0 commit comments

Comments
 (0)