From 78223d43d02d20996003e12fe2c51ae1072d55fa Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Thu, 14 Nov 2024 21:33:19 -0500 Subject: Registration page --- src/Auth.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/Auth.js') diff --git a/src/Auth.js b/src/Auth.js index 7254c40..81ddad9 100644 --- a/src/Auth.js +++ b/src/Auth.js @@ -30,16 +30,17 @@ function getFragmentQuery() { export const _getToken = (Just) => (Nothing) => (pair) => () => { const frag = getFragmentQuery(); const token = frag.get("id_token"); - if (token) { - document.cookie = `id_token=${token}; path=/; SameSite=Strict`; - } - let id_token = null; + document.location.hash = ""; + // if (token) { + // document.cookie = `id_token=${token}; path=/; SameSite=Strict`; + // } + // let id_token = null; let authnonce = null; for (let c of document.cookie.split("; ")) { const [k, v] = c.split("="); - if (k === "id_token") id_token = v; - else if (k === "authnonce") authnonce = v; + // if (k === "id_token") id_token = v; + if (k === "authnonce") authnonce = v; } - if (id_token && authnonce) return Just(pair(id_token)(authnonce)); + if (token && authnonce) return Just(pair(token)(authnonce)); return Nothing; }; -- cgit v1.2.3