Access modes
Internal
Only members of your Zite organization who have been given access to the app can open it. They’re signed
in automatically, so there’s no sign-in screen, and
context.user is populated on every request. The
default for new apps.External
Anyone can access the app. Users sign in through a Zite-hosted page. The auth SDK is available but
optional: a public marketing page needs no sign-in, a customer portal does.
accessMode field ("internal" or "external") in the app’s zite.config.json. An agent
picks it from who the app’s users are and asks you when that’s unclear. Changing it takes effect when you next
publish, and the editor’s publish dialog warns you which apps would become public or internal.
You manage who can use an app on the workspace’s Members page: Internal apps lists the org members
with access to each internal app, and Public apps lists the users signed up to or invited to each external app.
Signing in
On the frontend, useuseAuth from zitejs/auth:
authenticated: true and read context.user.
See the auth reference for the full API.
Sign-in methods
External apps can offer email magic link, Google sign-in, and SSO. At least one must be enabled. You also control signups: open to anyone, disabled (invite only), or restricted to specific email domains. Some options depend on your plan:
Business-plan features are also included on Team and Enterprise.
These are configured per app (in
zite.config.json under authentication); an agent sets them up for you.
Auth hooks
When an app’s users live somewhere else (a roster table, a CRM, an internal API), add hooks inzite.auth.ts
at the app root, next to zite.config.json:
beforeSignUp can admit an email even when signups are disabled or domain-restricted, or deny it.
beforeSignIn does the same for existing users, and afterSignUp / afterSignIn run side effects.
verifySession can end a session, and the fields it returns are merged into the signed-in user. All hooks
are optional and fail open on error.
User sync (
userSync in zite.config.json), including syncing users from Airtable, is deprecated. Use
auth hooks instead.