Skip to main content
The MfaWebAuthnEnrollmentSuccess class implements the mfa-webauthn-enrollment-success screen functionality.
MfaWebAuthnEnrollmentSuccess

Constructors

Create an instance of MfaWebAuthnEnrollmentSuccess screen
Example
import MfaWebAuthnEnrollmentSuccess from '@auth0/auth0-acul-js/mfa-webauthn-enrollment-success';
const sdk = new MfaWebAuthnEnrollmentSuccess();

// Assuming 'sdk' is an instance of MfaWebAuthnEnrollmentSuccess
async function handleContinueClick() {
  try {
    await sdk.continue();
    // User will be redirected by Auth0.
  } catch (error) {
    console.error("Error continuing after WebAuthn enrollment success:", error);
    // Display error message to the user, potentially from sdk.transaction.errors
  }
}

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 mfa-webauthn-enrollment-success 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

continue
(options ?)
This method allows the user to continue the authentication flow after a successful WebAuthn enrollment. This method sends a POST request to the /u/mfa-webauthn-enrollment-success endpoint with the action set to “default”, indicating the user is proceeding from this success screen. Returns a promise that resolves when the continue action is successfully submitted.
Example
import MfaWebAuthnEnrollmentSuccess from '@auth0/auth0-acul-js/mfa-webauthn-enrollment-success';
const sdk = new MfaWebAuthnEnrollmentSuccess();

// Assuming 'sdk' is an instance of MfaWebAuthnEnrollmentSuccess
async function handleContinueClick() {
  try {
    await sdk.continue();
    // User will be redirected by Auth0.
  } catch (error) {
    console.error("Error continuing after WebAuthn enrollment success:", error);
    // Display error message to the user, potentially from sdk.transaction.errors
  }
}
options
OPTIONAL
Optional. An object for CustomOptions if any additional parameters need to be sent with the request. These custom parameters will be included in the form data.
getErrors
This method retrieves the array of transaction errors from the context, or an empty array if none exist.