Optionaloptions: UseResendOptionsOptional configuration such as timeoutSeconds and onTimeout.
An object with:
remaining — seconds left until the next resend is permitted.disabled — true if resending is currently blocked.startResend — call to initiate a resend immediately (if allowed).email-identifier-challengeemail-otp-challengelogin-email-verificationlogin-passwordless-email-codelogin-passwordless-sms-otpmfa-email-challengemfa-sms-challengemfa-voice-challengephone-identifier-challengereset-password-mfa-email-challengereset-password-mfa-sms-challengereset-password-mfa-voice-challengeimport { useResend } from '@auth0/auth0-acul-react/mfa-sms-challenge';
export function ResendButton() {
const { remaining, disabled, startResend } = useResend({
timeoutSeconds: 30,
onTimeout: () => console.log('You can resend again'),
});
return (
<button onClick={startResend} disabled={disabled}>
{disabled ? `Resend in ${remaining}s` : 'Resend Code'}
</button>
);
}
This React hook manages "resend" actions (e.g., resending a verification code) on ACUL screens.
This hook:
startResendfunction to trigger a resend immediately.