Returns the current login / account state. Poll this whenever you need a
one-off read; use onAuthChange or useAuth to react to changes.
user is null unless this frame holds auth:identity (see
SandboxUser); status alone is baseline and always available.
Off-host (plain vite dev — no host to report a session) status stays
'unknown' FOREVER — it never settles to 'signed-out'. Code that waits for a
settled status before proceeding (e.g. attributing authorship) hangs locally:
gate such flows on status === 'signed-in' combined with a timeout or an
explicit local fallback, never on "status is no longer 'unknown'".
Returns the current login / account state. Poll this whenever you need a one-off read; use onAuthChange or useAuth to react to changes.
userisnullunless this frame holdsauth:identity(see SandboxUser);statusalone is baseline and always available.Off-host (plain
vite dev— no host to report a session)statusstays'unknown'FOREVER — it never settles to'signed-out'. Code that waits for a settled status before proceeding (e.g. attributing authorship) hangs locally: gate such flows onstatus === 'signed-in'combined with a timeout or an explicit local fallback, never on "status is no longer 'unknown'".