<SignUpForm />
The <SignUpForm /> component provides a frictionless onboarding experience for new users.
In modern identity systems, a secure registration flow is significantly more complex than simply saving a password to a database. You must cryptographically verify a user’s contact information before granting them access to your application. This component handles that entire lifecycle—from initial credential collection to verification and session establishment—safely and automatically.
Import
Usage
Place the component on a dedicated public registration route. It will automatically render input fields based on the required attributes configured in your Wacht Dashboard. For example, if you require a user to provide a “First Name” and “Last Name”, those fields are instantly rendered with full validation.The Verification Lifecycle
Unlike legacy sign-ups, modern identity platforms require strict contact verification to prevent spam and account takeover. Here is exactly what happens when a user registers via the<SignUpForm />:
- Collection: The user inputs their desired identifier (email address or phone number) alongside a strong password. If social providers (Google, GitHub) are enabled, they are prominently displayed as 1-click alternatives.
- Pre-Registration: Wacht securely creates an unverified “staged” user record in the backend.
- Delivery: If the user chose to sign up via email or phone, an OTP (One-Time Passcode) or Magic Link is immediately dispatched to their device.
- The Challenge: The component orchestrates a seamless UI transition to a verification modal, prompting the user for the code.
- Promotion: Once the code is verified cryptographically, Wacht promotes the staged record to an active User, establishes a secure HTTP-only browser session, and issues a redirect back into your application dashboard.
