Signup and Recovery Reuse the Same Foundation
Signup flow
- User enters name and email.
- Server generates an OTP code.
- Store the code hash with purpose
signup.
- Send the email.
- Only create the user after successful verification.
Why this matters
- Email ownership is proven before account creation.
- The flow stays simple and consistent.
- OTP codes also become the recovery path if a user loses a passkey.