ping-identity
    Preparing search index...

    Interface FidoClient

    Reusable client for FIDO operations.

    interface FidoClient {
        authenticate(
            options: FidoAuthenticationOptions,
        ): Promise<FidoAuthenticationResult>;
        authenticateForDaVinci(
            daVinci: DaVinciInstance,
            options?: FidoDaVinciAuthenticationOptions,
        ): Promise<FidoDaVinciResult>;
        authenticateForJourney(
            journey: JourneyInstance,
            options?: FidoJourneyAuthenticationOptions,
        ): Promise<FidoJourneyResult>;
        register(options: FidoRegistrationOptions): Promise<FidoRegistrationResult>;
        registerForDaVinci(
            daVinci: DaVinciInstance,
            options?: FidoDaVinciRegistrationOptions,
        ): Promise<FidoDaVinciResult>;
        registerForJourney(
            journey: JourneyInstance,
            options?: FidoJourneyRegistrationOptions,
        ): Promise<FidoJourneyResult>;
    }
    Index

    Methods

    • Runs the native FIDO passkey ceremony for an active DaVinci FIDO2 authentication collector.

      Parameters

      Returns Promise<FidoDaVinciResult>

      A promise that resolves to the WebAuthn assertion payload. Informational only — submit natively by advancing the flow with daVinci.next({ collectors: [] }).

      FidoError when the ceremony fails or the collector cannot be resolved.

      On ceremony failure the rejection carries clientError, the WebAuthn DOMException name reported by the native collector (see FidoClientErrorName). When clientError is defined, report the failure to the server by advancing the flow with daVinci.next({ collectors: [] }) so the flow can branch on it; do not submit the node's collectors, a SUBMIT_BUTTON shadows the FIDO error. Without propagation the failure stays client-side and the server never observes it. Resolution failures such as FIDO_COLLECTOR_NOT_FOUND carry no clientError and must not be propagated.

      try {
      await fido.authenticateForDaVinci(daVinci);
      } catch (error) {
      const err = FidoError.from(error);
      if (err.clientError !== undefined) {
      // The collector classified the failure; submit it so the flow can branch.
      try {
      await daVinci.next({ collectors: [] });
      } catch (propagationError) {
      // Advancing the flow also failed; surface propagationError without
      // losing the original ceremony failure.
      }
      }
      throw err;
      }
    • Runs the native FIDO passkey ceremony for an active DaVinci FIDO2 registration collector.

      Parameters

      Returns Promise<FidoDaVinciResult>

      A promise that resolves to the WebAuthn attestation payload. Informational only — submit natively by advancing the flow with daVinci.next({ collectors: [] }).

      FidoError when the ceremony fails or the collector cannot be resolved.

      On ceremony failure the rejection carries clientError, the WebAuthn DOMException name reported by the native collector (see FidoClientErrorName). When clientError is defined, report the failure to the server by advancing the flow with daVinci.next({ collectors: [] }) so the flow can branch on it; do not submit the node's collectors, a SUBMIT_BUTTON shadows the FIDO error. Without propagation the failure stays client-side and the server never observes it. Resolution failures such as FIDO_COLLECTOR_NOT_FOUND carry no clientError and must not be propagated.

      try {
      await fido.registerForDaVinci(daVinci);
      } catch (error) {
      const err = FidoError.from(error);
      if (err.clientError !== undefined) {
      // The collector classified the failure; submit it so the flow can branch.
      try {
      await daVinci.next({ collectors: [] });
      } catch (propagationError) {
      // Advancing the flow also failed; surface propagationError without
      // losing the original ceremony failure.
      }
      }
      throw err;
      }