docs
/
AI skills

The site's sign-up form — fields, consent, verification, groups and spam

What the built-in /register page asks and does, how to add or require contact fields in Site Config › Sign-up, what happens to terms and marketing consent, how the email is proven, which groups a new customer lands in and how to add more, and what the Spam switches, rate limits and disposable-address blocking really do today.

The site's sign-up page is the fixed route /register. It is drawn by the platform, not by a page of the site, and it can't be switched off or replaced at that address (Built-in pages and templates). This skill covers what that form asks, what it does with the answers, and how to protect it. The API calls behind sign-in (password, magic link, refresh, 2FA) are in App auth and sign-in. If the business needs a vetted application instead of open sign-up, use Registration that creates the customer.

"Tested" below means checked on the local engine with a @test.local customer that was deleted afterwards. Everything else is read from the code, with the file named.

How the built-in sign-up works

  1. The visitor opens /register. The page loads the site and reads site.signupForm, the extra questions the engine builds from the site's signupFields (base-app app/(auth)/register/page.tsx 22–28).
  2. The form always asks Full name and Email address, then each extra question. The button reads Send magic link. There is no password field (register-content.tsx 212–313). Tested: with no signupFields, the only inputs are name and email.
  3. On submit, the browser checks that the name, the email and every required extra question are filled (register-content.tsx 105–122). The site's server then:
    • splits the name: the first word becomes firstName and the rest lastName (app/(auth)/actions.ts 147–149);
    • makes a random password the customer never sees (152);
    • calls POST /profile/customer/signup with the extra answers, the email, that password and the names (169–175);
    • asks for a magic link for that email (180).
  4. The visitor sees "Check your email! We sent a magic link to …" (register-content.tsx 202–208). Tested.
  5. The engine creates the customer at once, in the group Customer, with username = email. It queues the customer-welcome email (users.service.ts customerSignup 3772–3862). Tested: one sign-up produced two emails, "Your secure login link" (magic-link-customer) and "Welcome!" (customer-welcome).
  6. The link opens /auth/magiclink, which signs them in and sends them to /account. If they arrived with ?redirect=, ?benefit= or ?affiliate=, it sends them there instead (see the table below). (app/(auth)/auth/magiclink/route.ts 51–68; auth/complete-login/page.tsx 72–91.)

Sign-up errors the visitor can see:

SituationMessage
Name or email empty"Full name is required" / "Email is required"
A required extra question empty"
The email already has an account"An account with this email already exists. Please sign in instead." (actions.ts 192–196; the engine says "…Please login instead.")
The account was made but the link could not be sent"Your account was created, but the sign-in email could not be sent. Please request a magic link from the sign-in page." (actions.ts 179–184)

Addresses the sign-up page reads:

ParameterWhat it does
emailPre-fills the email box
redirect (or callbackUrl, returnTo)Where the visitor lands after the magic link. Not checked: see "What it can't do yet"
benefit=<benefit name>Shows that benefit's banner ("Sign up to claim your benefit"). After the link they land on /account/benefits?apply=<name>
affiliate=<program name>Shows the affiliate program's banner. After the link they land on /account/affiliates?affiliate=<name>

/login links to /register ("Create one"), and /register links back to /login. Both carry these parameters across.

The account exists before the email is proven. The customer record is made the moment the form is sent. Clicking the link only signs the customer in; it does not mark anything verified. There is no emailVerified flag on a sign-up (tested: the new record had none), and no setting holds an account until the link is used. Someone who never clicks still shows up in Contacts, and has already been sent the welcome email.

The sign-up settings

All of these are stored on the site record (site.data). In Studio they are under Site Config (the site's card on /app/welcome → Site Config) (websitemint components/welcome-screens/site-config-form.tsx 99–113).

Studio labelFieldValuesWhat it really does
Sign-up › the field listsignupFields[{ field, label?, required? }]The extra questions on /register, in this order. Tested
Spam › Protect sign-upsspamProtectionUsertrue / falseNothing. The schema describes it as "Enable Google reCAPTCHA on login, create account and password recovery pages" (base-app lib/models/site.ts 684–689), but no code in base-app or appengine reads it
Spam › Protect commentsspanProtectionComment (spelled with an n)true / falseNothing either. The comment service accepts a recaptchaToken in its body type and never checks it (appengine comments/comments.service.ts 65–75)
My Account › Layout page, SectionsmyAccountWhat wraps and fills the account area: see Customer account portal
(not in Studio)myAccount.presetdefault, minimal, modern, elegant, dark, midnightThe look of /login, /register and the account area (app/(auth)/layout.tsx 17, 32–33)

How a sign-up question is built

The site stores only which contact field to ask, plus an optional label and required flag. When the site loads, the engine reads the org's contact (customer) collection schema and turns each row into a question (appengine site/signup-form.ts 37–57, attached in site/site.service.ts 156–165):

From the schemaBecomes
enum or optionsa select ("Choose…" plus the options)
type: booleana checkbox
type: number / integera number box (sent as a number)
format: emailan email box
format: date / date-time, or a name ending in date / containing birtha date box
a name containing phone / mobilea phone box (autocomplete tel)
x-control: textarea / richtexta text area
anything elsea text box

The label is the row's label, else the schema title, else the field name made readable ("jobTitle" → "Job Title"). A field that isn't required shows "(optional)".

These rows are dropped, with no error (signup-form.ts 17, 44–45):

  • name, firstName, lastName, email: the form always asks these itself;
  • a field the contact schema doesn't have;
  • an object, or an array without options (e.g. groups, address);
  • a repeated field.

Tested: signupFields with phone (label "Mobile number", required), company, taxExempt, leadStatus, groups, email and a made-up field drew exactly four inputs: signup-phone (type="tel", required), signup-company, signup-taxExempt (checkbox) and signup-leadStatus (select). The other three were dropped.

Studio's Add a contact field… picker offers only plain built-in contact fields: string, number, integer or boolean, not hidden, not read-only, and never name or email (site-config-form.tsx 90–94). It shows the field's key under its label, a label box, a Required tick, up and down arrows and Stop asking.

Answers are saved on the new contact under the same field names. Checkbox answers are saved as true. Empty answers are left out (register-content.tsx 129–136).

"Required" is checked only in the visitor's browser. The form refuses to send without it (register-content.tsx 117–122), but neither the site's server action nor the engine's sign-up checks signupFields (actions.ts 127–202; customerSignup 3772–3862). A customer made any other way (the API, an import, staff, an automation) can be missing a "required" field. Don't promise the business that every customer has it.

Ask first

  • Which site? Sign-up questions are per site.
  • Which questions, in which order, and which are required? Use the business's own labels.
  • Which contact field holds each answer? It must be a field the contact schema has, e.g. phone, company, jobTitle, birthday. If nothing fits, say so. Don't invent a field.
  • Consent wording. If they want terms or marketing consent, get the exact sentence, and the link to their terms page.
  • Groups. Should every new customer join a customer group (e.g. "Website sign-ups")? Name it.
  • Spam. Is spam happening now (how many, what the addresses look like), or is this just a precaution? It changes what to offer (step 4).

Steps

1. Site Config: read the site as it is

repo_find on site by data.name, then repo_find_one by its id (a find result is partial). Note data.signupFields, data.spamProtectionUser, data.myAccount and data.features, exactly as stored.

Then read the contact schema the questions will come from: get_schema on customer (or call_appengine GET repository/collections/customer). For each field the person wants, find its key and type.

Hands on: the site id, its current signupFields (often missing), and the field key for each question. Check: open /register on the site. The inputs there match the current signupFields (none extra when it's missing).

2. Site Config › Sign-up: the questions

Write the whole list, in order, with repo_update on site: patch: { "signupFields": [ … ] } (repo_update merges patch into data at the top level, so the list is replaced whole). By API: POST repository/update-partial/site/<id> with { "data.signupFields": [ … ] }. Studio: Site Config → Sign-up → Add a contact field…, then a label and Required per row, and save.

[
  { "field": "phone",   "label": "Mobile number", "required": true },
  { "field": "company", "label": "Company" },
  { "field": "jobTitle" }
]

Never send { "data": { … } } to update-partial: it replaces the whole data and the site loses its name, home page and domains. Don't touch features or myAccount in the same write.

To stop asking a question, write the list without it. To stop asking all of them, write [].

Stop: /register is live. Show the person the questions, in order, with labels and which are required, and wait for yes before saving.

Hands on: the saved signupFields. Check: repo_find_one on the site shows the list. Open /register: one input per row you expect, in order, with "(optional)" on the ones that aren't required. A row that doesn't appear was dropped (see above). Tell the person which, and why.

There is no consent setting on the sign-up page. What can be done:

NeedWhat works today
"I agree to the terms" box the visitor must tickOnly with a boolean contact field in the schema: add it to signupFields with required: true and the agreement sentence as its label. The browser then refuses to send without the tick, and true is saved on the contact. The label is plain text, so it can't hold a link: put the terms link on the page around the form (the frame is root; see Shared header and footer). The built-in contact schema has no field meant for this; don't reuse an unrelated one such as taxExempt.
Recorded, provable consent (time, wording)Not on the built-in form: nothing stores when or what they agreed to. Build your own registration page (Registration that creates the customer) whose collection records the answer and the time.
Marketing opt-inNot on the built-in form. Use a promotion or newsletter sign-up with double opt-in instead: Promotions and the sign-up page, Newsletter setup.

A brand-new sign-up has no subscriptions list on its record, and POST /profile/customer/subscribe reads that list without checking it is there (users.service.ts customerSubscribe 4132–4143). Don't build an opt-in on that endpoint.

Hands on: the consent field key and label, if one was added. Check: on /register, try to send without ticking. The browser stops it.

4. Automation: groups for new customers

Every sign-up joins the sign-in group Customer and nothing else (customerSignup 3793–3797). There is no setting for a default customer group. To put every new customer in a CRM customer group, make an automation, following Automation when a record is added or updated:

  • trigger: database_change, { datatype: "customer", operation: "created" };
  • step: action add_to_customer_group, { group: "<group name>", create: true } (appengine automation/actions/add-to-customer-group.action.ts). It keeps the group's list and the contact's Customer Groups field in step, as the Contacts screen does.

Create it with create_automation and status: "draft". Membership and pricing by group are covered in Add customers to a group and Price lists and customer-group pricing.

That trigger fires for every new contact: imports, staff-added contacts, guests and automation-made customers too, not just /register. To keep the group to website sign-ups, add a condition on a field only the sign-up path fills, or say plainly that it covers everyone.

Stop: turning it on changes the group (and possibly the prices) of every new customer from then on. Show the trigger and the group, and wait for yes. Then call_appengine POST /automation/start/<sk>.

Hands on: the automation's sk. Check: one test sign-up (step 6) appears in the group; the run is listed at GET /automation/<sk>/runs.

5. Spam and abuse: what to tell the person

Be straight about it. Today the built-in sign-up has no bot protection:

ProtectionStateCode
reCAPTCHA / Turnstile / hCaptchaNone. Protect sign-ups saves a flag nothing readslib/models/site.ts 684–689; no reader in base-app or appengine
Honeypot fieldNoneregister-content.tsx
Rate limitOnly the engine-wide limit: per IP, 100,000 requests per 5 minutes by default (RATE_LIMIT_MAX, RATE_LIMIT_WINDOW_MS). Calls from the site's own server inside the cluster are not counted, and /register sends its sign-up from the site's serverappengine main.ts 144–186
Disposable or blocked email domainsNone. The engine accepts any non-empty text, lower-cased; only the browser's email box asks for an @customerSignup 3773–3776; users/customer-email.ts 7
One account per emailYes: a repeat email is refused, whatever its casecustomerSignup 3778–3791
Proven email before accessOnly in practice: the hosted page throws away the session and makes them use the magic link. The account itself already existsactions.ts 177–186

What the person can do now:

  • Turn on 2FA or new-device checks for customers (enableTwoFactorForCustomers, enableNewDeviceAuthentication). This protects sign-in, not sign-up. See App auth and sign-in.
  • Gate accounts behind an emailed code by using a registration form instead of open sign-up, with an automation that creates the customer only once the code is proven: Registration that creates the customer. /register itself still exists, so remove links to it from the site.
  • Clean up after the fact. Find suspicious contacts (repo_find on customer by email domain or createdate) and show the person the list. Delete only after a yes, one at a time, with call_appengine DELETE user/customer/profile/<email>. The repository delete refuses customers (USE_DOMAIN_API, tested), and the domain delete emails the address "Your account has been removed".

Stop: deleting a customer is permanent and emails them. List who, and wait for yes.

6. Check with one test sign-up

On the site, open /register and sign up once with a @test.local address (it gets the welcome and magic-link emails; that is acceptable only for @test.local).

  • The page says "Check your email!".
  • repo_find on customer by that email: firstName and lastName are split from the name, groups is ["Customer"], and each extra answer is under its field name.
  • If step 4 is on, the contact is in the group.

Then delete the test customer (DELETE user/customer/profile/<email>; it is emailed the removal notice) and confirm with repo_find that it's gone.

When it's done

Tell the person:

  • the questions /register now asks, in order, which are required, and that "required" is a browser check only;
  • what happens on sign-up: the account is made straight away, a welcome email and a magic link are sent, and there is no password until they use Forgot password?;
  • the group automation, if any, and whether it is on or still a draft;
  • plainly, that the platform has no captcha, honeypot, per-form rate limit or disposable-address blocking yet, and that Protect sign-ups does nothing.

Open Site Config → Sign-up and /register on the site.

What it can't do yet

  • No captcha. Site Config › Spam › Protect sign-ups and Protect comments are saved but never read.
  • No honeypot, no per-form rate limit, no disposable-domain or blocklist check on sign-up.
  • No "verify email first". The account exists, and the welcome email goes out, before the link is clicked. No record marks an email as proven.
  • "Required" sign-up questions are enforced only in the browser.
  • No consent setting, nothing stores when or what a customer agreed to, and no marketing opt-in on the form.
  • No default customer group setting; use the automation in step 4.
  • No password on sign-up. The hidden random password means a new customer signs in by magic link, or sets a password with Forgot password?.
  • /register can't be switched off or replaced at its address. Build your own page elsewhere and change the links.
  • redirect after sign-up is not checked. Whatever address it names, including another website, is where the visitor is sent once signed in (magiclink/route.ts 62–63; complete-login/page.tsx 83, 115). Link only to the site's own paths.
  • Studio only offers built-in contact fields, while the engine reads the org's stored contact schema. A field that exists only in the stored schema can still be added with repo_update.

Don'ts

  • Don't tell the person Protect sign-ups turns on reCAPTCHA. It doesn't.
  • Don't add name, firstName, lastName, email, groups, password or another object or array field to signupFields. They are dropped, or don't belong on a public form.
  • Don't use an unrelated contact field (taxExempt, title…) to hold a terms answer; it changes what that field means to the business.
  • Don't send real sign-ups to test. @test.local only, and delete it after.
  • Don't delete suspicious customers in bulk, or without a yes: each one is emailed.
  • Don't write signupFields as a partial list, and never data: { … } through update-partial.