@auth0/auth0-acul-js - v0.1.0-beta.5
    Preparing search index...

    Class MfaWebAuthnRoamingEnrollment

    Class implementing the mfa-webauthn-roaming-enrollment screen functionality. This screen is displayed when a user needs to enroll a WebAuthn roaming authenticator (like a security key).

    Hierarchy

    • BaseContext
      • MfaWebAuthnRoamingEnrollment

    Implements

    Index

    Constructors

    Properties

    screenIdentifier: string = ScreenIds.MFA_WEBAUTHN_ROAMING_ENROLLMENT

    Methods

    • Initiates the WebAuthn credential creation and submits the result to the server. This corresponds to the user interacting with the FIDO Security Keys prompt.

      Parameters

      Returns Promise<void>

      import MfaWebAuthnRoamingEnrollment from '@auth0/auth0-acul-js/mfa-webauthn-roaming-enrollment';

      const webauthnEnrollment = new MfaWebAuthnRoamingEnrollment();
      // Assuming you have obtained the WebAuthn credential response (e.g., from navigator.credentials.create)
      const credentialResponse = { /* ... serialized credential ... *&#x2F; };
      await webauthnEnrollment.enroll({ response: JSON.stringify(credentialResponse) });
    • Submits details about a WebAuthn browser error to the server. This is used when the browser's WebAuthn API encounters an error.

      Parameters

      Returns Promise<void>

      import MfaWebAuthnRoamingEnrollment from '@auth0/auth0-acul-js/mfa-webauthn-roaming-enrollment';

      const webauthnEnrollment = new MfaWebAuthnRoamingEnrollment();
      await webauthnEnrollment.showError({
      error: {
      name: 'NotAllowedError',
      message: 'The operation either timed out or was not allowed.',
      },
      });