Password reset with code verification

In this example, we demonstrate how to reset a user's password using a verification code sent via email or SMS through the OneEntry API.

✅ Purpose of the scenario:
  • The user enters an email or phone number
  • Receives a confirmation code (via email or SMS)
  • Enters the code and new password. Password is being updated in OneEntry
✅ What you need:
  • A valid PROJECT_URL and APP_TOKEN for authentication with the OneEntry API.
  • Registered user
📌 Important:
  • The generateCode method sends a code to email/sms.
  • Change password with code works without user authorization.
  • These examples do not include error handling.
  • You can manage errors using a try-catch block or by employing a construction like await Promise.catch((error) => error).
Loading sandbox…