Skip to content

Commit

Permalink
It's ok now
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ committed Feb 12, 2024
1 parent 8a3ac9a commit 57f1cc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ <h1><a href="#">Codes<span>20</span></a></h1>

<script type="module" src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"></script>
<script src="login.js"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -103,4 +103,5 @@
if(localStorage.accessToken && !undefined) {
document.getElementById("login-button").href = "./user.html";
document.getElementById("login-button").innerHTML = "ACCOUNT";
location.search = "";
}

0 comments on commit 57f1cc8

Please sign in to comment.