16 lines
729 B
Markdown
16 lines
729 B
Markdown
# 0041 Sign-out confirms, then reloads to the landing
|
|
|
|
Status: Proposed · Area: architecture · Date: 2026-10-09 · Decided by: agent
|
|
|
|
## Context
|
|
J12-1d asks before signing out. A soft navigation after `logout()` races `AuthGuard`'s redirect to login.
|
|
|
|
## Decision
|
|
`SignOutConfirm` (sheet on mobile, 420 modal on desktop) calls `auth.logout`, which clears the auth store, the query cache, drafts and `session.*` keys, then does `window.location.replace('/')`. A failure keeps the dialog open with an error toast and retry; a session that had already ended still lands on the landing.
|
|
|
|
## Alternatives
|
|
- `router.replace('/')`: flashes the login page and keeps in-memory state.
|
|
|
|
## Consequences
|
|
Sign-out costs one full page load.
|