Self-onboarding
With self-onboarding on, your project’s app can sign a person up, verify their address, and create one customer for them: a tenant copied from your project’s latest published Release, with that person as its administrator. Nobody has to open the Customers page.
Every customer made this way appears on the Customers page with a Signed up mark within a minute. From then on it is a customer like any other: it counts against your quota, receives Releases when you roll them out, and can be suspended, resumed or deleted.
Self-onboarding is a premium feature. Your Buildpad host turns it on for a project, on top of Customers. It needs a Buildpad Engine version that serves it; until then the Customers page says “Self-onboarding is not available yet” or names the version it needs.
Turning sign-up on
You need to be a project Admin.
Open the Customers page
The Self-onboarding section sits above the customers. Choose Turn on.
Choose the limits and where the key goes
- Customers per person (1 by default, at most 10).
- Sign-ups per hour, customers created per hour and customers created per day, per key. The defaults are 200, 20 and 200.
- Mail me when one key creates this many in a day (50 by default).
- Write the key to: the project’s main app, one of its microapps, or Somewhere else (show the key once) when the sign-up code lives in an app the Platform does not host.
Publish a Release if the project has none
Customers made by sign-up start from the latest published Release. If the project has none yet, the dialog offers Publish Release 1 and turn on: it publishes the Blueprint as it is now.
Copy the key, and redeploy
The Onboarding key is shown once. Copy it now: it is not stored and will not be shown again.
When the Platform wrote it to your app, it is in the app’s hosting as BUILDPAD_ONBOARDING_KEY.
Redeploy the app so its server can read it.
The amplify.yml line
Your app’s server reads the key at run time, so the build must write it into .env.production.
Starter kits made after self-onboarding shipped already carry this line in amplify.yml, before
pnpm build. An older repository needs it added:
build:
commands:
# Self-onboarding: the app's server reads the onboarding key at run time. Server only; never NEXT_PUBLIC_.
- '[ -z "$BUILDPAD_ONBOARDING_KEY" ] || echo "BUILDPAD_ONBOARDING_KEY=$BUILDPAD_ONBOARDING_KEY" >> .env.production'
- pnpm buildThe key belongs to your app’s server only. Never give it a NEXT_PUBLIC_ name, never put it
in client code, and never commit it. The Engine refuses any request that comes from a browser.
The key
The panel lists each key by its last four characters, with when it was created, its last use, and how many sign-ups, verifications and customers it made.
- Last use proves the deployment. A key with no last use after you redeployed means the app
cannot read it: check the
amplify.ymlline. - Rotate issues a second key and writes it to the app in place of the first. The app uses it after its next deployment. Once the new key shows a last use, the panel offers Revoke the old key. A project holds at most two live keys.
- Revoke takes effect on the Engine’s next request. Customers the key already made are kept.
- A key marked Issued outside the Platform was made directly on the Engine by your operator. You can revoke it here.
What a stranger can and cannot do
Anyone who reaches your app’s sign-up page can sign up. They can create a customer only after verifying their address, and only within your limits:
| Limit | Where it is set |
|---|---|
| Sign-ups and resends per key per hour | Your setting (200 by default) |
| Sign-ups, and resends, per network address your app reports | 5 per 15 minutes each |
| Resends per person | 3 per hour |
| Wrong verification codes, per key and network address | 10 per 15 minutes |
| Customers per person | Your setting (1 by default) |
| Customers per project | Your organization’s quota |
| Customers created per key | Your settings (20 an hour, 200 a day by default) |
Your app reports the visitor’s network address to the Engine. An app that does not report it puts every visitor in one shared budget of 5 sign-ups per 15 minutes, so a busy app must report it (the Buildpad skills’ sign-up code does).
Copying takes a moment. Customers are copied one at a time on the project’s Engine, about one a second. A burst waits its turn, and the app retries a creation that times out, so nobody gets two customers.
The person who signed up is the new customer’s administrator. Your project’s own administrator account is added to every customer too, as it is for customers you create on the page.
Stopping and turning off
- Stop sign-ups answers every sign-up with “not available” on the app’s next request and keeps the keys. Resume sign-ups turns it back on.
- Turn off revokes every key and removes it from the app. Customers already made are kept.
When a key leaks
If a key reaches someone it should not (a browser, a public repository, a log):
Stop sign-ups
Choose Stop sign-ups. Nothing more is created with any key.
Revoke the key
Choose Revoke on the key. Every later request with it is refused.
List what it made
Choose Identities on the key: every address it signed up, whether it was verified, and the customers each one created. A leaked key can create verified accounts for addresses its holder does not own, so look at all of them.
Suspend what should not stand
From the identities, choose Suspend all customers made with this key, or suspend by the time window the leak covers. Type the number of customers to confirm.
Issue a new key and resume
Issue a new key, redeploy the app, and resume sign-ups.
The panel’s From a browser count shows requests that carried a browser’s Origin header: a
number above zero means the key reached client code.
Mails
The project’s Admins receive a mail when the project reaches 80 % and 100 % of its customer quota, and when one key creates more customers in a day than your threshold. The mails never carry a key or a person’s address.
For operators
The Engine’s side (its settings, the key’s routes and the limits) is described in the Engine’s
operator guide, docs/OPERATOR_CUSTOMER_SELF_ONBOARDING.md in the Buildpad Engine repository.