> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Type Alias: MfaPollingOptions

<ParamField body="MfaPollingOptions" type="object">
  Configuration options for managing an MFA push-notification polling process.

  Supply these options when starting a polling session to control how often
  the challenge endpoint is queried and how success or failure is handled.

  ```ts Example theme={null}
  export type MfaPollingOptions = {
    /**
     * Optional interval, in **milliseconds**, between consecutive polling requests.
     *
     * - If omitted, the SDK’s internal default interval is used (typically 5000 ms).
     * - Choose a value that balances responsiveness with rate-limit considerations.
     *
     * @defaultValue Implementation-specific (commonly 5000 ms)
     */
    intervalMs?: number;

    /**
     * Optional callback executed once the MFA push challenge is successfully
     * approved and polling completes.
     *
     * - Called exactly **once**, after which polling stops automatically.
     * - Useful for advancing the login flow (e.g., calling `continue()`).
     */
    onCompleted?: () => void;

    /**
     * Optional callback invoked if an error occurs while polling.
     *
     * Receives an {@link ULError} object containing:
     * - `status` — the HTTP status code from the failed request
     * - `responseText` — the raw response body, if available
     *
     * - Called once per error event; polling may retry depending on error type.
     * - Use to surface error messages or trigger custom retry/abort logic.
     */
    onError?: (error: ULError) => void;
  };
  ```

  <Expandable title="Properties">
    <ParamField body="intervalMs?" type="number">
      Optional interval, in **milliseconds**, between consecutive polling requests.

      * If omitted, the SDK’s internal default interval is used (typically 5000 ms).
      * Choose a value that balances responsiveness with rate-limit considerations.

      #### Default Value

      ```ts theme={null}
      Implementation-specific (commonly 5000 ms)
      ```
    </ParamField>

    <ParamField body="onCompleted()?" type="() => void">
      Optional callback executed once the MFA push challenge is successfully
      approved and polling completes.

      * Called exactly **once**, after which polling stops automatically.
      * Useful for advancing the login flow (e.g., calling `continue()`).
    </ParamField>

    <ParamField body="onError()?" type="(error) => void">
      Optional callback invoked if an error occurs while polling.

      Receives an [ULError](/docs/libraries/acul/js-sdk/Screens/interfaces/Error) object containing:

      * `status` — the HTTP status code from the failed request

      * `responseText` — the raw response body, if available

      * Called once per error event; polling may retry depending on error type.

      * Use to surface error messages or trigger custom retry/abort logic.

      **Properties**

      <ParamField body="error" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/Error">Error</a></span>}>
        **Properties**

        <ParamField body="code" type="string" />

        <ParamField body="field?" type="string" />

        <ParamField body="message" type="string" />

        <ParamField body="rules?" type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/PasswordComplexityRule">PasswordComplexityRule[]</a></span>} />
      </ParamField>
    </ParamField>
  </Expandable>
</ParamField>
