Optionalpayload: CustomOptionsOptional custom parameters to send with the request.
A promise that resolves once the form is submitted, before the new page loads. It doesn't confirm that a new code was sent.
Submits a form POST with action: "resend". Auth0 responds by rendering this
screen again. If a captcha is required, it sends the user back to the login-id
screen instead (signup-id if the user started from signup) to complete the
captcha. Either way the browser loads a new page, and React state, effects, and
timers are lost.
Code after await resendOTP() may still run, but anything it sets up, such as a
"code sent" message, is gone after the reload. If the SMS can't be sent, for
example because of a rate limit, Auth0 renders this screen again without an error.
Only extensibility errors (such as an error from an Action) and unexpected failures
appear in useErrors() on the reloaded page. The returned promise doesn't reject.
For a cooldown between resends, use useResend(). It stores its countdown in
localStorage, so the countdown survives the reload.
Requests a new one-time code for the user's phone number.