Appearance
OTP - Reset password ​
Use this action to let a user set a new password after proving ownership of their email with a valid OTP (one‑time passcode). It verifies the code and updates the password automatically.
FIRST REQUEST A CODE
Before you can use this action, you must first use the Request code action to generate a code.
Configuration ​
| Display Key | Example Input | Description |
|---|---|---|
| "user@example.com" | The user’s email address. | |
| OTP Code | "362941" | The code the user received and entered. |
| New Password | "StrongP@ssw0rd!" | The new password to set if the OTP is valid. |
Example flow ​
1
Run the
OTP – Request code action to generate a code, and set OTP Type: forget-password2
In the
On OTP requested trigger, send the reset 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 a new password, then run the
OTP – Reset password 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 }Related Event Triggers ​
The
OTP – Reset password action will fire these Event TriggersUse this trigger to notify users about the change.

