StaticscreenOptionalpayload: Screens.CustomOptionsUtility 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 PhoneIdentifierChallenge from '@auth0/auth0-acul-js/phone-identifier-challenge';
const handleStatusChange = (remainingSeconds, isDisabled) => {
setDisabled(isDisabled);
setRemaining(remainingSeconds);
};
const handleTimeout = () => {
console.log('Timeout completed, resend is now available');
};
const { startResend } = phoneChallenge.resendManager({
timeoutSeconds: 30,
onStatusChange: handleStatusChange,
onTimeout: handleTimeout
});
// Call startResend when user clicks resend button
await startResend();
Optionalpayload: Screens.CustomOptionsOptionalpayload: Screens.CustomOptionsOptionalpayload: Screens.CustomOptions
Retrieves the array of transaction errors from the context, or an empty array if none exist.