Sign-ups and access
Two settings decide who gets in. The environment’s sign-up mode decides whether new accounts can be made at all; it is shared by the apps of the group, because they share their users. Each app’s access mode decides which of those users may use that app.
Sign-up mode
Section titled “Sign-up mode”signup_mode |
New accounts |
|---|---|
open (the default) |
Anyone can sign up, within the plan’s limits. |
invite_only |
No new accounts are made at login. |
closed |
No new accounts are made at login. |
Only open lets new accounts be made. Sign-up also closes by itself, whatever the mode, while the month’s active users are at the plan’s pause or the day’s cap of new accounts is reached (see Bot protection). Logins of existing users never stop.
Set the mode on the Security policy page, or with the management API (admin role):
PATCH /v1/environments/{environment_id}Content-Type: application/json
{ "signup_mode": "closed" }What users see when sign-up is closed
Section titled “What users see when sign-up is closed”The login does not say who has an account. With sign-up closed:
- the login UI offers no sign-up;
- a code to an address without an account gets the same answer as any other, and no email is sent;
- a sign-up through the sign-up form is refused with “Signing up is not open for this app.” (
signup_closed).
App access
Section titled “App access”Each app has an access mode, set on its Access page:
access_mode |
Who may use the app |
|---|---|
open (the default) |
Every user of the group. |
invite_only |
Users who were granted the app. |
closed |
Users who were granted the app, and no new grants are accepted. |
A user whose access to the app was disabled is refused in every mode. Sign-up through an app’s clients is offered only when the environment’s sign-up is open and the app is open.
Access is decided after the user has proven who they are, so a refusal says nothing about which accounts exist. A refused user sees “This account does not have access to {app}.” in the embedded login; the hosted page sends them back to the client with error=access_denied. A token for another app’s API is refused the same way when that app does not let the user in.
With the management API:
PUT /v1/environments/{environment_id}/apps/{app_id}/settingsContent-Type: application/json
{ "access_mode": "invite_only" }Granting an app
Section titled “Granting an app”On the Access page, or with POST /v1/environments/:id/apps/:app/users (admin role), grant the app to:
- users by id (
user_ids, up to 1,000 in one request); - every user of the environment (
all: true); - the users of another app of the group (
from_app).
The answer counts who was granted and who was skipped. A closed app accepts no new grants (409). A member’s standing is granted until their first visit, then active; disabling one (PATCH with status: "disabled") ends their refresh tokens for that app, and removing one takes the grant away. See Apps and groups.
Who may change it
Section titled “Who may change it”Letting more people in takes the admin role: opening an app’s access mode (from closed to invite_only to open), dropping the email requirement, granting the app, and enabling a disabled user again. Narrowing access is a developer’s to do. The dashboard shows the same split.
An app can link to its terms (terms_url, an https address, on the Access page or in PUT …/apps/:app/settings). Each user is then asked once to accept them before their first login to that app completes (the terms challenge and the accept_terms step), and a sign-up must say the terms were accepted (terms_accepted: true). The time is kept as the user’s terms_accepted_at for that app.
Apps that need an email address
Section titled “Apps that need an email address”An app that writes to its users, or pays them, can require every user to have an address (email_required, on its Access page). Someone who has none, because they logged in with a wallet or through a provider that gave no address, is asked for one before the login completes:
- The login shows the
add_emailchallenge, naming the app. - The user enters an address and gets a code.
- The code gives the account that address, verified.
An address somebody else already has gets the same answer and no code, and its owner is emailed. Nothing merges two accounts. A session from before the requirement ends at its next refresh, so the user is asked at their next login, and a token for that app’s API through another app’s client is refused with “{app} needs an email address: log in to it to add one.”
The addresses that may sign up
Section titled “The addresses that may sign up”The security policy also decides which addresses may make an account: tagged addresses, throwaway domains and Gmail variants. See Bot protection.