From e466a5437423e5b341778783ccba9862076f7daf Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Tue, 11 Apr 2023 20:20:47 +0100 Subject: [PATCH] Update auth page and scripts --- auth.html | 8 ++++++++ js/auth.js | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/auth.html b/auth.html index 5bdff3c..a91528e 100644 --- a/auth.html +++ b/auth.html @@ -24,6 +24,14 @@ +
+ + + + Home + + +
diff --git a/js/auth.js b/js/auth.js index 0ed6bb4..8e8fc2f 100644 --- a/js/auth.js +++ b/js/auth.js @@ -49,6 +49,13 @@ async function checkAuth(key) { async function init(){ // Reads registration key from query, and calls registerKey(key) cmdOut("Reading authorisation code"); const key = await getQuery("key"); + if (key === "false") { + cmdOut("No valid key found") + cmdOut("Try clicking the link again") + cmdOut("or request a new activation link") + hideLoading() + return + } cmdOut("Requesting API Key from server"); if (!await registerKey(key)) { cmdOut("Failed to register key")