Commit
·
38f0739
1
Parent(s):
88c474d
Update index.js
Browse files
index.js
CHANGED
|
@@ -34,10 +34,6 @@ function hexFromBytes(arr) {
|
|
| 34 |
* but it is currently only tested with the Hugging Face Hub.)
|
| 35 |
*/
|
| 36 |
async function oauthLogin(opts) {
|
| 37 |
-
if (window.self !== window.top && window.self !== window.parent) {
|
| 38 |
-
document.cookie = "username=John Doe; expires=Fri, 12 Mar 2027 00:49:11 GMT; path=/";
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
if (typeof window === "undefined") {
|
| 42 |
throw new Error("oauthLogin is only available in the browser");
|
| 43 |
}
|
|
@@ -146,7 +142,7 @@ async function oauthLogin(opts) {
|
|
| 146 |
};
|
| 147 |
}
|
| 148 |
|
| 149 |
-
const opensInNewWindow =
|
| 150 |
|
| 151 |
const newNonce = crypto.randomUUID();
|
| 152 |
// Two random UUIDs concatenated together, because min length is 43 and max length is 128
|
|
|
|
| 34 |
* but it is currently only tested with the Hugging Face Hub.)
|
| 35 |
*/
|
| 36 |
async function oauthLogin(opts) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
if (typeof window === "undefined") {
|
| 38 |
throw new Error("oauthLogin is only available in the browser");
|
| 39 |
}
|
|
|
|
| 142 |
};
|
| 143 |
}
|
| 144 |
|
| 145 |
+
const opensInNewWindow = false;
|
| 146 |
|
| 147 |
const newNonce = crypto.randomUUID();
|
| 148 |
// Two random UUIDs concatenated together, because min length is 43 and max length is 128
|