The MfaVoiceEnrollment screen class provides methods associated with the mfa-voice-enrollment screen. This screen is displayed for a user needs to enter a phone number to receive a voice call with a code to continue enrollment.
Constructors
Create an instance of MfaVoiceEnrollment screen
import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment' ;
const mfaVoiceEnrollmentManager = new MfaVoiceEnrollment ();
const handleContinueEnrollment = async () => {
try {
await mfaVoiceEnrollmentManager . continue ({
phone: '+1234567890' ,
// Add any optional CustomOptions here if needed
});
console . log ( 'Voice enrollment continued successfully.' );
} catch ( error ) {
console . error ( 'Error continuing voice enrollment:' , error );
}
};
Properties
Provides branding-related configurations, such as branding theme and settings.
Provides client-related configurations, such as id, name, and logoUrl.
Provides information about the user’s organization, such as organization id and name.
Contains data about the current prompt in the authentication flow.
Contains details specific to the screen, including its configuration and context.
Contains data related to the tenant, such as id and associated metadata.
Provides transaction-specific data, such as active identifiers and flow states.
Handles untrusted data passed to the SDK, such as user input during login.
Details of the active user, including username, email, and roles.
Methods
This method continues with the default action. import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment' ;
const mfaVoiceEnrollmentManager = new MfaVoiceEnrollment ();
const handleContinueEnrollment = async () => {
try {
await mfaVoiceEnrollmentManager . continue ({
phone: '+1234567890' ,
// Add any optional CustomOptions here if needed
});
console . log ( 'Voice enrollment continued successfully.' );
} catch ( error ) {
console . error ( 'Error continuing voice enrollment:' , error );
}
};
Optional payload. [`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Additional data collected from the user.
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
This method allows picking a country code for the phone number. import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment' ;
const mfaVoiceEnrollment = new MfaVoiceEnrollment ();
const handlePickCountryCode = async () => {
await mfaVoiceEnrollment . selectPhoneCountryCode ();
};
Optional payload. [`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Additional data collected from the user.
This method allows the user to try another MFA method. import MfaVoiceEnrollment from '@auth0/auth0-acul-js/mfa-voice-enrollment' ;
const mfaVoiceEnrollment = new MfaVoiceEnrollment ();
const handleTryAnotherMethod = async () => {
await mfaVoiceEnrollment . tryAnotherMethod ();
};
Optional payload. [`key`: `string`]
"string" | "number" | "boolean" | "undefined"
Any additional custom options.