From 57f1cc80ac8b33c487f64928f224c9b9add9980b Mon Sep 17 00:00:00 2001 From: Sh Raj <66713844+SH20RAJ@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:12:16 +0530 Subject: [PATCH] It's ok now --- 404.html | 1 + login.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/404.html b/404.html index da73be0..c0442be 100644 --- a/404.html +++ b/404.html @@ -46,5 +46,6 @@

Codes20

+ \ No newline at end of file diff --git a/login.js b/login.js index 61c3d23..b79ae84 100644 --- a/login.js +++ b/login.js @@ -42,7 +42,7 @@ const data = await response.json(); const accessToken = data.access_token; - localStorage.accessToken = accessToken; + localStorage.accessToken =(accessToken!=undefined)? accessToken:false; // You now have the access token, you can send it to your server or perform other actions console.log("GitHub Access Token:", accessToken); @@ -103,4 +103,5 @@ if(localStorage.accessToken && !undefined) { document.getElementById("login-button").href = "./user.html"; document.getElementById("login-button").innerHTML = "ACCOUNT"; + location.search = ""; } \ No newline at end of file