Cross-tab session sync is absent on the auth pages #69

Closed
opened 2026-09-12 01:51:25 -04:00 by jared · 0 comments
Owner

Severity: low · Type: bug · Confidence: high

Location: src/app/hooks/useSessionSync.ts, src/app/pages/client/ClientRoot.tsx:212

Problem

useSessionSync() is mounted only inside ClientRoot, i.e. only in the authenticated shell.
A tab parked on the login/register/OIDC-callback pages never subscribes, so when another tab completes
a login that tab keeps showing the login form and, if the user submits it, starts a second
device/session for the same account. The symmetric case (logout in tab A while tab B is authenticated)
is handled correctly.

How to trigger

open two tabs at the login screen, sign in on tab A, switch to tab B — it still shows the form.

Suggested fix

mount useSessionSync() (or a lighter "session appeared → reload" variant) at the
App/router root so it also covers the unauthenticated routes.


Filed from the September 2026 client audit (branch lotus @ 4bea4895).

**Severity:** low · **Type:** bug · **Confidence:** high **Location:** `src/app/hooks/useSessionSync.ts`, `src/app/pages/client/ClientRoot.tsx:212` ### Problem `useSessionSync()` is mounted only inside `ClientRoot`, i.e. only in the authenticated shell. A tab parked on the login/register/OIDC-callback pages never subscribes, so when another tab completes a login that tab keeps showing the login form and, if the user submits it, starts a second device/session for the same account. The symmetric case (logout in tab A while tab B is authenticated) is handled correctly. ### How to trigger open two tabs at the login screen, sign in on tab A, switch to tab B — it still shows the form. ### Suggested fix mount `useSessionSync()` (or a lighter "session appeared → reload" variant) at the `App`/router root so it also covers the unauthenticated routes. --- --- _Filed from the September 2026 client audit (branch `lotus` @ 4bea4895)._
jared added this to the Audit 2026-09 · Medium & Low milestone 2026-09-12 01:51:25 -04:00
jared added the bugpriority: lowarea: auth-session labels 2026-09-12 01:51:25 -04:00
jared self-assigned this 2026-09-12 01:51:25 -04:00
jared closed this issue 2026-09-12 20:29:09 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#69