Skip to content

Auth Configuration

Configure which sign-in methods are available in your project: Dashboard → Auth → Configuration.

MethodDescriptionUse when
Email + PasswordTraditional sign-up/sign-in with email and passwordWeb apps, B2B, forms
Email OTPPasswordless sign-in via 6-digit code to emailMobile apps, modern SaaS
Phone OTPPasswordless sign-in via SMS codeConsumer apps, emerging markets
BothEmail+password and/or OTP on email or phoneMaximum flexibility

Available endpoints:

  • POST /auth/registeremail, password, name, customFields
  • POST /auth/loginemail, password
  • POST /auth/otp/sendemail (if OTP enabled)
  • POST /auth/otp/verifyemail + code

Example register with custom fields:

{
"email": "user@example.com",
"password": "StrongPassword123!",
"name": "Jane Doe",
"customFields": {
"company": "Acme Inc",
"role": "Developer"
}
}

Available endpoints:

  • POST /auth/otp/sendphone
  • POST /auth/otp/verifyphone + code

Example:

{ "phone": "+919876543210" }
// → verify with code
{ "phone": "+919876543210", "code": "123456" }

Available endpoints:

  • All of the above
  • POST /auth/otp/send accepts either email or phone
// Passwordless via phone
{ "phone": "+919876543210" }
// Passwordless via email
{ "email": "user@example.com" }

Add custom fields in Dashboard → Auth → Custom Registration Fields. These are stored in profile_extras and returned via GET /me:

// Register
{
"email": "user@example.com",
"password": "password",
"customFields": { "plan": "pro", "company": "Acme" }
}
// GET /me response
{
"id": "uuid",
"email": "user@example.com",
"profile_extras": { "plan": "pro", "company": "Acme" }
}

Toggle Require email verification in the dashboard. When enabled, signUp returns requiresVerification: true and no token is issued until the email is confirmed.

See Email Verification for handling this in your app.

Configure these in Dashboard → Auth → Configuration:

SettingDescription
Email Verification URLYour app’s /verify-email route — Aerostack appends ?token=...
Password Reset URLYour app’s /reset-password route — Aerostack appends ?token=...