Back to Home
web2.auth

Reset Password

Forgot your password? Request a password-reset OTP, then set a new password. Requires a verified email address.

Step 1

Request Password-Reset OTP

Call web2.auth.forgotPassword() with your registered email. A password-reset OTP will be sent to your inbox. Has a 60-second cooldown between requests.

const result = await web2.auth.forgotPassword({
email: 'user@example.com',
blackboxUrl,
});
// result.message → "OTP sent"
Step 2

Reset Password

Enter the OTP from your email and your new password. Call web2.auth.resetPassword().

await web2.auth.resetPassword({
email, otp: '123456',
newPassword: 'newSecurePassword',
blackboxUrl,
});

Console Output

Waiting for action...