Commit
·
89ceee2
1
Parent(s):
212a332
Update index.js
Browse files
index.js
CHANGED
@@ -38,6 +38,8 @@ async function oauthLogin(opts) {
|
|
38 |
throw new Error("oauthLogin is only available in the browser");
|
39 |
}
|
40 |
|
|
|
|
|
41 |
const hubUrl = opts?.hubUrl || HUB_URL;
|
42 |
const openidConfigUrl = `${new URL(hubUrl).origin}/.well-known/openid-configuration`;
|
43 |
const openidConfigRes = await fetch(openidConfigUrl, {
|
@@ -169,6 +171,8 @@ async function oauthLogin(opts) {
|
|
169 |
new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(newCodeVerifier)))
|
170 |
);
|
171 |
|
|
|
|
|
172 |
if (opensInNewWindow) {
|
173 |
window.open(
|
174 |
`${opendidConfig.authorization_endpoint}?${new URLSearchParams({
|
|
|
38 |
throw new Error("oauthLogin is only available in the browser");
|
39 |
}
|
40 |
|
41 |
+
console.log("localstorage before", localStorage);
|
42 |
+
|
43 |
const hubUrl = opts?.hubUrl || HUB_URL;
|
44 |
const openidConfigUrl = `${new URL(hubUrl).origin}/.well-known/openid-configuration`;
|
45 |
const openidConfigRes = await fetch(openidConfigUrl, {
|
|
|
171 |
new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(newCodeVerifier)))
|
172 |
);
|
173 |
|
174 |
+
console.log("localstorage after", localStorage)
|
175 |
+
|
176 |
if (opensInNewWindow) {
|
177 |
window.open(
|
178 |
`${opendidConfig.authorization_endpoint}?${new URLSearchParams({
|