Commit
•
524cef7
1
Parent(s):
08ff3f4
Update index.html
Browse files- index.html +2 -2
index.html
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
</script>
|
16 |
</head>
|
17 |
<body>
|
18 |
-
<div class="card">
|
19 |
<h1>OAuth in a static Space</h1>
|
20 |
<p>Checkout the <a href="https://huggingface.co/spaces/huggingfacejs/client-side-oauth/blob/main/index.html" target="_blank">index.html</a> file to see the few lines of code
|
21 |
enabling this space</p>
|
@@ -45,7 +45,7 @@
|
|
45 |
document.querySelector("pre").textContent = JSON.stringify(oauthResult, null, 2);
|
46 |
localStorage.setItem("oauth", JSON.stringify(oauthResult));
|
47 |
document.getElementById("signout").style.removeProperty("display");
|
48 |
-
document.getElementById("signout").
|
49 |
localStorage.removeItem("oauth");
|
50 |
window.location.href = window.location.href.replace(/\?.*$/, '');
|
51 |
window.location.reload();
|
|
|
15 |
</script>
|
16 |
</head>
|
17 |
<body>
|
18 |
+
<div class="card" style="margin-bottom: 2rem;">
|
19 |
<h1>OAuth in a static Space</h1>
|
20 |
<p>Checkout the <a href="https://huggingface.co/spaces/huggingfacejs/client-side-oauth/blob/main/index.html" target="_blank">index.html</a> file to see the few lines of code
|
21 |
enabling this space</p>
|
|
|
45 |
document.querySelector("pre").textContent = JSON.stringify(oauthResult, null, 2);
|
46 |
localStorage.setItem("oauth", JSON.stringify(oauthResult));
|
47 |
document.getElementById("signout").style.removeProperty("display");
|
48 |
+
document.getElementById("signout").onclick = async function() {
|
49 |
localStorage.removeItem("oauth");
|
50 |
window.location.href = window.location.href.replace(/\?.*$/, '');
|
51 |
window.location.reload();
|