> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MfaWebAuthnPlatformEnrollmentMembers

MfaWebAuthnPlatformEnrollmentMembers

````ts Example theme={null}
export interface MfaWebAuthnPlatformEnrollmentMembers extends BaseMembers {
  /**
   * The screen object with MFA WebAuthn Platform Enrollment specific data structure.
   */
  screen: ScreenMembersOnMfaWebAuthnPlatformEnrollment;
  
  /**
   * Initiates the WebAuthn platform credential creation process using the public key options
   * available on `this.screen.publicKey` and submits the resulting credential to the server.
   * This method internally calls `createPasskeyCredentials` (which wraps `navigator.credentials.create()`).
   *
   * @param {SubmitPasskeyCredentialOptions} [payload] - Optional custom parameters to be sent to the server
   * along with the created credential.
   * @returns {Promise<void>} A promise that resolves when the credential is successfully created and submitted.
   * @throws {Error} Throws an error if `this.screen.publicKey` is not available, if `createPasskeyCredentials` fails
   * (e.g., user cancellation, hardware issues), or if the submission to the server fails.
   * @example
   * ```typescript
   * // Assuming 'sdk' is an instance of MfaWebAuthnPlatformEnrollment
   * try {
   *   if (!sdk.screen.publicKey) { // Check if options are available
   *     throw new Error("Public key creation options are not available on the screen context.");
   *   }
   *   await sdk.submitPasskeyCredential(); // No need to pass publicKey explicitly
   *   // On success, Auth0 handles redirection.
   * } catch (error) {
   *   console.error('Passkey enrollment failed:', error);
   *   // Handle error, potentially by calling reportBrowserError if it's a WebAuthn API error
   *   if (error.name && error.message) { // Check if it looks like a WebAuthn error
   *     await sdk.reportBrowserError({ error: { name: error.name, message: error.message } });
   *   }
   * }
   * ```
   */
  submitPasskeyCredential(payload?: SubmitPasskeyCredentialOptions): Promise<void>;

  /**
   * Reports a browser-side error encountered during the WebAuthn `navigator.credentials.create()` operation.
   * This method sends the error details to the server.
   *
   * @param {ReportBrowserErrorOptions} payload - The browser error details and any custom options.
   * @returns {Promise<void>} A promise that resolves when the error report is successfully submitted.
   * @throws {Error} Throws an error if the submission fails.
   * @example
   * ```typescript
   * // Assuming 'sdk' is an instance of MfaWebAuthnPlatformEnrollment
   * // In the catch block of an attempted passkey creation (e.g. from submitPasskeyCredential):
   * } catch (webAuthnError) {
   *   if (webAuthnError.name) { // Check if it's likely a WebAuthn API error
   *      await sdk.reportBrowserError({ error: { name: webAuthnError.name, message: webAuthnError.message } });
   *   }
   *   // Update UI to show error message to the user
   * }
````

## Properties

<ParamField body="branding" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers">BrandingMembers</a></span>} />

<ParamField body="client" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ClientMembers">ClientMembers</a></span>} />

<ParamField body="organization" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers">OrganizationMembers</a></span>} />

<ParamField body="prompt" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/PromptMembers">PromptMembers</a></span>} />

<ParamField body="screen" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnMfaWebAuthnPlatformEnrollment">ScreenMembersOnMfaWebAuthnPlatformEnrollment</a></span>}>
  The screen object with MFA WebAuthn Platform Enrollment specific data structure.
</ParamField>

<ParamField body="tenant" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TenantMembers">TenantMembers</a></span>} />

<ParamField body="transaction" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TransactionMembers">TransactionMembers</a></span>} />

<ParamField body="untrustedData" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembers">UntrustedDataMembers</a></span>} />

<ParamField body="user" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UserMembers">UserMembers</a></span>} />

## Methods

<ParamField body="refuseEnrollmentOnThisDevice" type="Promise<void>">
  Allows the user to refuse WebAuthn platform enrollment on the current device.
  This action indicates the user does not want to use a platform authenticator on this specific device.

  A promise that resolves when the refusal action is successfully submitted.

  #### Throws

  Throws an error if the submission fails.

  ```typescript Example theme={null}
  // Assuming 'sdk' is an instance of MfaWebAuthnPlatformEnrollment
  await sdk.refuseEnrollmentOnThisDevice();
  ```

  <Expandable title="Parameters">
    <ParamField body="payload?" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/CustomOptions">CustomOptions</a></span>}>
      Optional custom options to include with the request.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="reportBrowserError" type="Promise<void>">
  Reports a browser-side error encountered during the WebAuthn `navigator.credentials.create()` operation.
  This method sends the error details to the server.

  A promise that resolves when the error report is successfully submitted.

  #### Throws

  Throws an error if the submission fails.

  ```typescript Example theme={null}
  // Assuming 'sdk' is an instance of MfaWebAuthnPlatformEnrollment
  // In the catch block of an attempted passkey creation (e.g. from submitPasskeyCredential):
  } catch (webAuthnError) {
    if (webAuthnError.name) { // Check if it's likely a WebAuthn API error
       await sdk.reportBrowserError({ error: { name: webAuthnError.name, message: webAuthnError.message } });
    }
    // Update UI to show error message to the user
  }
  ```

  <Expandable title="Parameters">
    <ParamField body="payload" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ReportBrowserErrorOptions">ReportBrowserErrorOptions</a></span>}>
      The browser error details and any custom options.

      **Properties**

      <ParamField body="error" type="object">
        <Expandable title="properties">
          <ParamField body="message" type="string" />

          <ParamField body="name" type="string" />
        </Expandable>
      </ParamField>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="snoozeEnrollment" type="Promise<void>">
  Allows the user to snooze or postpone the WebAuthn platform enrollment.
  This action typically means the user will be reminded to enroll at a later time.

  A promise that resolves when the snooze action is successfully submitted.

  #### Throws

  Throws an error if the submission fails.

  ```typescript Example theme={null}
  // Assuming 'sdk' is an instance of MfaWebAuthnPlatformEnrollment
  await sdk.snoozeEnrollment();
  ```

  <Expandable title="Parameters">
    <ParamField body="payload?" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/CustomOptions">CustomOptions</a></span>}>
      Optional custom options to include with the request.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="submitPasskeyCredential" type="Promise<void>">
  Initiates the WebAuthn platform credential creation process using the public key options
  available on `this.screen.publicKey` and submits the resulting credential to the server.
  This method internally calls `createPasskeyCredentials` (which wraps `navigator.credentials.create()`).

  A promise that resolves when the credential is successfully created and submitted.

  #### Throws

  Throws an error if `this.screen.publicKey` is not available, if `createPasskeyCredentials` fails
  (e.g., user cancellation, hardware issues), or if the submission to the server fails.

  ```typescript Example theme={null}
  // Assuming 'sdk' is an instance of MfaWebAuthnPlatformEnrollment
  try {
    if (!sdk.screen.publicKey) { // Check if options are available
      throw new Error("Public key creation options are not available on the screen context.");
    }
    await sdk.submitPasskeyCredential(); // No need to pass publicKey explicitly
    // On success, Auth0 handles redirection.
  } catch (error) {
    console.error('Passkey enrollment failed:', error);
    // Handle error, potentially by calling reportBrowserError if it's a WebAuthn API error
    if (error.name && error.message) { // Check if it looks like a WebAuthn error
      await sdk.reportBrowserError({ error: { name: error.name, message: error.message } });
    }
  }
  ```

  <Expandable title="Parameters">
    <ParamField body="payload?" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/SubmitPasskeyCredentialOptions">SubmitPasskeyCredentialOptions</a></span>}>
      Optional custom parameters to be sent to the server
      along with the created credential.
    </ParamField>
  </Expandable>
</ParamField>
