> ## Documentation Index
> Fetch the complete documentation index at: https://zite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication for Public Zite apps

> Choose how people sign in to your public app and who can create an account.

Add login to a public app when customers need their own account, records, or portal. [Internal apps](https://zite.com/help/platform/access/internal-apps.md) use Zite accounts and organization permissions instead.

You can [scan the workspace for security issues](https://zite.com/help/platform/workspaces/security-scans.md) to check that public apps require sign-in where they should.

> [!NOTE]
>
> Email sign-in codes on this page are for people signing in to your public app. They are not two-factor authentication for your Zite account. See [Two-factor authentication](https://zite.com/help/platform/account/two-factor-authentication.md).

## Add login

Open **Settings**, then **Login** in the app editor. For a public app without login, select **Add login** and let Zite finish the change.

Under **Sign-in method**, choose how people can log in:

| Method | How it works |
| - | - |
| **Sign in with email code** | The app emails a six-digit code that the person types on the sign-in page they are already on. The code expires after 10 minutes. |
| **Sign in with Google** | Signs in with a Google account. It can be enabled alongside **Sign in with email code**. |
| **Sign in with SSO** | Uses your organization's identity provider. Requires Enterprise and replaces the other methods. |

The person stays on the same sign-in page. They can go back to change their email, or select **Send a new code** if they need another one. A new code can be requested at most every 30 seconds, and it cancels the previous code.

After the app emails a code, the sign-in page shows **Didn't get it?** and a countdown such as **Resend in 29s**. That countdown is only the wait before someone can ask for another code. It is not a time limit for entering the code. The code stays valid for 10 minutes, and they can type it in during or after the countdown.

> [!NOTE]
>
> Each app switches to the six-digit code only when you next republish that app. Existing sign-in links keep working. Invitation emails still use a link, because they go to people who are not on a sign-in page.

![Login settings showing public access, sign-in methods, and Invite only](https://mintcdn.com/zite/f0-rtBoy4arXjKKe/help/images/access/guide/login@2x.png?fit=max\&auto=format\&n=f0-rtBoy4arXjKKe\&q=85\&s=066ef1e5bb87e8dc1afa98bc8359571c)

Example setup for an invite-only client portal.

## Choose who can sign up

By default, **Anyone** can sign up. A person's first sign-in creates their user in the app.

You set this in the app's **Settings**, then **Login**, then the **Sign-in** tab, in the **Who can sign up?** section. The options are **Anyone**, **Only allowed domains**, and **Invite only**.

| Option | Who can create an account |
| - | - |
| **Invite only** | People you invite to the app |
| **Anyone** | Anyone who completes sign-up |
| **Only allowed domains** | People with email addresses from the domains you specify |

To stop strangers creating accounts, choose **Invite only** and invite people from the **Invite people** dialog. See [Managing users](https://zite.com/help/platform/workspaces/users-and-roles.md).

If you don't need to know who people are, [share the app publicly without a login](https://zite.com/help/platform/access/share-to-web.md).

Check the selected option rather than assuming the default. New and migrated apps can have different settings. Save your changes, then publish.

> [!NOTE]
>
> [Custom access rules](https://zite.com/help/platform/access/custom-access-rules.md) can override these settings. If the app has them, review those rules too.

## Set the session length

Under **Sessions**, choose how long people stay signed in after they stop using the app. The default for public apps is **1 year**. Choose a preset or **Custom…** for 1–365 days, then save and publish.

## Customize the login screen

Customizing the login screen is available on the Business, Team and Enterprise plans. Free and Pro plans see an upgrade prompt.

Open **Login**, then **Screen**, to customize the logo, titles, and supporting text. Save and publish the changes.

The Google sign-in screen (the Google account picker) can't be customized, because it's shown by Google.

Invitation and sign-in emails are managed separately in [**Settings → Notifications**](https://zite.com/help/platform/access/notifications.md).

## Test sign-in before you publish

Use **Preview as user** to review what someone can see and do. It does not replace testing the real sign-in flow.

After publishing, open the live link in a private browser window and check:

* **An allowed person** can sign in and complete their main task.
* **An uninvited person** is refused if the app is invite-only.
* **Each user sees the right records**, using the roles and permissions you set.

A sign-in button disappearing after login does not show whether access is configured correctly. Test while signed out as well as signed in.

## If a code does not work

* **They did not get the email:** Ask them to check their spam folder and confirm the address. They can select **Send a new code**. If the email could not be sent, the sign-in page shows **We couldn't send a sign-in code** instead of asking them to check their inbox.
* **The email is slow, or an older code does not work:** Each time a new code is sent to the same email (by selecting **Send a new code**, or by starting sign-in again), earlier codes stop working. Only the most recent email's code works. Ask them to enter their email once, keep the sign-in page open, wait for the email (check spam), and then enter that code.
* **The code expired:** Each code lasts 10 minutes. The email says **This code expires in 10 minutes.** Select **Send a new code** if those 10 minutes have passed.
* **Too many incorrect tries:** After five incorrect tries, the code stops working and the page tells them so. They can select **Send a new code**.
* **You removed them from the app:** Unused sign-in codes for that person are cancelled.

> [!TIP]
>
> If a sign-in code has expired or no longer works, select **Send a new code**. Invitation emails still use a link that lasts seven days; ask the person who invited you for a new invitation if needed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.