StaticscreenRequests a new OTP code to be sent to the user's email.
Optionaloptions: Screens.CustomOptionsOptional parameters to include in the resend request.
Utility FeatureGets resend functionality with timeout management for this screen
Optionaloptions: Screens.StartResendOptionsConfiguration options for resend functionality
Options for configuring resend functionality
OptionalonStatusChange?: Screens.OnStatusChangeCallbackOptionalonTimeout?: () => voidOptionaltimeoutSeconds?: numberResendControl object with startResend method
import EmailOTPChallenge from '@auth0/auth0-acul-js/email-otp-challenge';
const emailOTPChallenge = new EmailOTPChallenge();
const { startResend } = emailOTPChallenge.resendManager({
timeoutSeconds: 15,
onStatusChange: (remainingSeconds, isDisabled) => {
console.log(`Resend available in ${remainingSeconds}s, disabled: ${isDisabled}`);
},
onTimeout: () => {
console.log('Resend is now available');
}
});
// Call startResend when user clicks resend button
startResend();
Submits the OTP code entered by the user.
Optional parameters to include in the submission.
Represents the Email OTP Challenge screen.