aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-03 13:37:47 -0800
committerAdam Soltys <[email protected]>2026-03-03 13:37:47 -0800
commit35f15ebc061076709293bbe4e3e2ace78ac79445 (patch)
tree19ba2d5b8d6a927372a16a86c55218f81ef4db35 /src/lib
parentc6ed33aa9d1d0cdd65aa8d81aa9a05551e975822 (diff)
downloadcoinos-ui-35f15ebc061076709293bbe4e3e2ace78ac79445.tar.gz
coinos-ui-35f15ebc061076709293bbe4e3e2ace78ac79445.zip
static landing page with single Start Now button
Prerender the landing page, replace conditional auth header buttons with a single "Start Now" that checks the username cookie client-side. Set username cookie httpOnly: false in all login/register flows. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index 6815a5b2..cb1e5ec7 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -200,7 +200,7 @@ export const login = async (
const opts = { path: "/", expires };
if (u.language) cookies.set("lang", u.language, opts);
- cookies.set("username", user.username, opts);
+ cookies.set("username", user.username, { ...opts, httpOnly: false });
cookies.set("token", token, opts);
if (u.nsec) {
try {
@@ -544,7 +544,7 @@ export const register = async (
const expires = new Date();
expires.setSeconds(expires.getSeconds() + maxAge);
const opts = { path: "/", expires };
- cookies.set("username", user.username, opts);
+ cookies.set("username", user.username, { ...opts, httpOnly: false });
cookies.set("token", token, opts);
error = null;
}