Auth / Auth and Guard

Failure scenarios end to end

ScenarioAuthGuardClient sees
No cookieOption.none() visitorEvaluates visitor rulesPublic rows only; signedIn: false
Missing CSRF or foreign cookie401Skippeddenied: Unauthenticated
Expired or signed-out session401 (Your session ended.)Skippeddenied: Unauthenticated
Other tab switched accounts401 (SUBJECT_CHANGED)SkippedCall Remote.forget and re-fetch
Read rule fails for userResolves UserFilters row outRow omitted from results
Write rule fails for userResolves User403; write aborteddenied: Forbidden
Source skips Read rules—GuardServer.validate throwsServer refuses to boot

Using Guard or Auth on its own

  • Guard without Auth: Supply any resolvePrincipal function returning your principal type (for example, a bearer token parser or test header reader).
  • Auth without Guard: AuthServer.resolver returns your User directly so custom Sources can inspect it, though you give up shared declarative enforcement and automatic Me flags.