Skip to content
MyAppBuilder
StableGuide

Authentication overview

Authentication lets people sign in to your app : customers who view their own orders, staff who manage jobs, partners who upload documents. Once sign-in is on, every visitor is either signed in with a role or a public visitor, and your pages, components and data rules decide what

Authentication overview

Authentication lets people sign in to your app: customers who view their own orders, staff who manage jobs, partners who upload documents. Once sign-in is on, every visitor is either signed in with a role or a public visitor, and your pages, components and data rules decide what each of them can see and do.

App users are not builder accounts

MyAppBuilder keeps two completely separate populations:

Builder accountsApp users
WhoYou and your team, who design the appThe people who use the published app
Where managedUsers → Builder team (workspace members)Users → App users (per app, per environment)
RolesWorkspace viewer / editor / admin / ownerApp roles: Owner, Admin, Staff, Viewer, Customer, Public and your custom roles
Sign in atthe builderyour published app's /login

Builder accounts never sign in to a published app. In the builder preview you do not sign in either; you pick a role with Preview as and the preview behaves as a user of that role.

When to use

  • Any page that is not public.
  • "Only their own records" rules (a customer sees only their quotes).
  • Knowing who created a record (Created by), or using Current user › email in forms and emails.

How to enable sign-in

  1. Open Users → Sign-in.
  2. Turn on the Authentication switch.
  3. Enable at least one sign-in method: - Email & password — classic accounts with "Forgot password". - Magic link — a one-click sign-in link sent by email, no password. - Google — "Continue with Google"; needs your own Google OAuth client (see Google sign-in).
  4. Under Sign-up & access: - Allow sign-up — anyone can create an account. Turn it off to add people yourself in App users. - Require email verification — new accounts must click a link in their email before they can sign in. - Role for new sign-ups — the role every self-registered account gets. Full-access roles can never be chosen here. - After sign-in, go to — the page people land on after signing in (a standard page without parameters; defaults to Home).
  5. Publish. The built-in screens (/login, /signup, /forgot-password, /account, …) are part of every app and styled with your theme.

What visitors see

  • A Sign in button appears in your app's navigation; signed-in users see their name, which opens /account, and a sign-out icon.
  • Protected pages send signed-out visitors to /login and bring them back afterwards.
  • Pages a role may not open disappear from the navigation.

Environments

App users exist separately for test data (staging app and builder) and live data (production app). Someone who signs up on the staging app does not have an account on the live app. Users → App users has a Test / Live switch.

Common mistakes

  • Turning on authentication but no sign-in method. Nobody can sign in; the Sign-in tab warns you.
  • Choosing a full-access role for sign-ups. Not allowed; new accounts should get Customer or a custom role with limited rules.
  • Expecting the builder preview to sign in. The preview simulates users through Preview as; sign-in forms there show "Sign-in is simulated in the builder preview".
  • Protected pages with authentication off. Visitors cannot sign in, so those pages are unreachable; the Page access table warns about this.

Advanced

Auth settings live in project.auth (enabled, providers.password/magicLink/google, allowSignup, defaultRoleId, requireEmailVerification, afterLoginPageId) and are changed with the update_auth_config command, which refuses an admin default role. App users are stored in app_users with project_id and env; passwords are hashed with scrypt and all sign-in endpoints are rate-limited per IP and per email.

Related

Was this helpful?