diff options
| author | LLLL Colonq <llll@colonq> | 2024-11-14 21:33:19 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-11-14 21:33:19 -0500 |
| commit | 78223d43d02d20996003e12fe2c51ae1072d55fa (patch) | |
| tree | e9ac49953293050b3c77adc14933d6a46488c854 /src/Auth.js | |
| parent | cf0070ac5a78d8042fa74d407fb9cb65352e2066 (diff) | |
Registration page
Diffstat (limited to 'src/Auth.js')
| -rw-r--r-- | src/Auth.js | 15 |
1 files changed, 8 insertions, 7 deletions
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; }; |
