Appearance
OTP - Sign in ​
Use this action to create a passwordless sign‑in flow. It verifies the user’s OTP (one‑time passcode) and, if valid, signs them in (or signs them up, if enabled).
FIRST REQUEST A CODE
Before you can use this action, you must first use the Request code aciton to generate a code.
Configuration ​
| Display Key | Example Input | Description |
|---|---|---|
| "user@example.com" | The user’s email (must match the target of the requested code). | |
| OTP Code | "362941" | The code the user received and entered. |
| Disable Sign Up | false | If true, prevents creating a new user when the email does not exist; the sign‑in will fail instead. |
Example flow ​
1
Run the
OTP – Request code action to generate a code, and set OTP Type: sign-in2
In the
On OTP requested Event Trigger, send the code (such as via email with Resend/SendGrid, or SMS with Twilio)3
After sending the code, allow the user to enter the code and run the
OTP – Sign in actionOTP INPUT ELEMENT
If you do not wish to create your own element to allow the user to input the code, WeWeb has its own native element.
Example output ​
json
{ "success": true, "session": { "user": { "id": "usr_123", "email": "user@example.com" } } }Related Event Triggers ​
The
OTP – Sign in action will fire these Event TriggersUse this trigger to run post‑login tasks such as updating a lastSeenAt column for the user, or sending analytics events after a successful OTP sign‑in.

