authSubstore
Exposes the current authentication state. The SDK populates this substore automatically — you do not call a login method directly; authentication is handled by the underlying session layer.
Table of contents
user
user: TUser | undefinedThe authenticated user object, or undefined when not logged in.
TUser is a Zod-inferred type from the user schema and includes standard identity fields (e.g., id, name, email). When the session has not yet resolved, user is undefined; distinguish this from a logged-out state by also checking isAuth.
Related
isAuth— boolean shorthand derived from this valuesubmitSubstore.isDraftEnabled— draft saving requires an authenticated user
isAuth
isAuth: booleanWhether the current user is authenticated.
true when user is defined and the session is active, false otherwise. Use this as the primary gate for features that require authentication (e.g., draft saving).
Related
user— the full user objectsubmitSubstore.isDraftEnabled— draft saving is only available whenisAuthistrue