Ticket: AUTH-T104 · Epic: E4 Sessions & SSO · Phase: Phase 1 — Core auth, sessions, SSO (MVP)
Priority: Urgent · Estimate: 2 points · Labels: epic:sessions, phase:1, spike, sso, better-auth
Depends on:
Community reports (better-auth issues #5611, #3938) describe cross-subdomain cookies being set and then dropped in some configurations. Before any product integration work, deploy the minimal Better Auth config to auth-dev.northeasternsga.com and a static stub on stub-dev.northeasternsga.com, then verify in Chrome, Firefox, and Safari: (1) login sets exactly one __Secure-sgauth-dev.session_token cookie with Domain=northeasternsga.com; (2) the stub's server receives it and the session endpoint resolves it; (3) sign-out clears it on both hosts; (4) the SGAUTH_ENV=preview host-only mode works on a *.vercel.app preview; (5) the local *.sga.localhost scheme works in all three browsers or the fallback (hosts-file sga.test) is adopted; (6) a stale cookie with the same name set by the stub host (cookie tossing) is observed and its effect documented. Record findings in docs/ENVIRONMENTS.md and adjust AUTH-T26/T34 accordingly.
Acceptance criteria
Generated from the SGAuth design (docs/sgauth-design in SGAOperations/auth). SGAuth is built on Neon and does not use Supabase.
Ticket: AUTH-T104 · Epic: E4 Sessions & SSO · Phase: Phase 1 — Core auth, sessions, SSO (MVP)
Priority: Urgent · Estimate: 2 points · Labels: epic:sessions, phase:1, spike, sso, better-auth
Depends on:
Community reports (better-auth issues #5611, #3938) describe cross-subdomain cookies being set and then dropped in some configurations. Before any product integration work, deploy the minimal Better Auth config to
auth-dev.northeasternsga.comand a static stub onstub-dev.northeasternsga.com, then verify in Chrome, Firefox, and Safari: (1) login sets exactly one__Secure-sgauth-dev.session_tokencookie withDomain=northeasternsga.com; (2) the stub's server receives it and the session endpoint resolves it; (3) sign-out clears it on both hosts; (4) theSGAUTH_ENV=previewhost-only mode works on a*.vercel.apppreview; (5) the local*.sga.localhostscheme works in all three browsers or the fallback (hosts-filesga.test) is adopted; (6) a stale cookie with the same name set by the stub host (cookie tossing) is observed and its effect documented. Record findings indocs/ENVIRONMENTS.mdand adjust AUTH-T26/T34 accordingly.Acceptance criteria
Generated from the SGAuth design (docs/sgauth-design in SGAOperations/auth). SGAuth is built on Neon and does not use Supabase.