ping-identity
    Preparing search index...

    Function createRecaptchaClient

    • Creates a reusable reCAPTCHA Enterprise client.

      Parameters

      Returns RecaptchaClient

      A reCAPTCHA client bound to the resolved configuration.

      Error when the native reCAPTCHA module is unavailable.

      Logger integration is optional and uses logger(...).nativeHandle.id when provided.

      No registration call is needed at factory time: the native reCAPTCHA callback registers itself with the Journey runtime as soon as the native module is linked (Android App Startup CallbackInitializer; iOS plugin probe in PingJourney), unlike FIDO's explicit registerDaVinciSerializer() call.

      Only Journey-scoped verification is exposed — the native verify() reads the site key from the callback payload and auto-submits token/action/clientError into the callback inputs, so there is no callback-free verification entry point in either native SDK.

      import { createRecaptchaClient } from '@ping-identity/rn-recaptcha';

      const recaptcha = createRecaptchaClient();
      const journey = await createJourneyClient({ server: serverConfig });
      const result = await recaptcha.verifyForJourney(journey, { index: 0 });
      if (result.type === 'failure') {
      // Callback inputs already carry the client error; proceed to next() and
      // let the server decide whether to re-issue the Captcha node.
      }