Skip to main content
MfaWebAuthnEnrollmentSuccess
Example
// 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
  }
}

Constructors

MfaWebAuthnEnrollmentSuccess
Constructor
Initializes a new instance of the MfaWebAuthnEnrollmentSuccess class. It retrieves the necessary context (screen, transaction, etc.) from the global universal_login_context and sets up screen-specific properties via ScreenOverride.

Throws

If the Universal Login Context is not available or if the screen name in the context does not match MfaWebAuthnEnrollmentSuccess.screenIdentifier.

Properties

branding
client
organization
prompt
screen
tenant
transaction
untrustedData
user
screenIdentifier
string
static

Methods

continue
Promise<void>
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.A promise that resolves when the continue action is successfully submitted. On successful submission, the Auth0 server will typically redirect the user to the next appropriate step in the authentication flow.

Throws

Throws an error if the form submission fails (e.g., due to network issues, an invalid transaction state, or other server-side validation errors). If an error occurs, details might be available in this.transaction.errors if the page re-renders.
Example
// 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
  }
}
getErrors
Retrieves the array of transaction errors from the context, or an empty array if none exist.An array of error objects from the transaction context.