SilentShield is an invisible, GDPR-compliant CAPTCHA alternative for React and Next.js apps. You load a lightweight client script, obtain a token and verify it on the server with the @forge12interactive/silentshield-sdk-js package and a single API key. There are no cookies, no tracking and no personal data, and hosting is EU-only by default.

Invisible CAPTCHA for React & Next.js

Works with any React or Next.js app via the lightweight SilentShield script: collect a nonce on submit, verify it on your backend with @forge12interactive/silentshield-sdk-js. Invisible and GDPR-compliant.

React CAPTCHA integration

Developer Experience

Framework-agnostic — works with any React or Next.js app
Lightweight client script — no heavy React package required
Nonce-based — invisible, no user interaction
@forge12interactive/silentshield-sdk-js for backend verification
Works with App Router and Pages Router
TypeScript-friendly

Code examples

Embed the client script

<!-- Add to <head> with SRI for security -->
(function () {
  var KEY = "YOUR_API_KEY";
  var SITE = location.hostname;
  var V = "2025.09.1";
  var s = document.createElement('script');
  s.src = "https://api.silentshield.io/client.js?k=" + encodeURIComponent(KEY)
    + "&v=" + encodeURIComponent(V)
    + "&site=" + encodeURIComponent(SITE);
  s.async = true;
  s.crossOrigin = "anonymous";
  document.head.appendChild(s);
})();

React component

import React, { useState } from "react";

export default function ContactForm() {
  const [loading, setLoading] = useState(false);
  const [message, setMessage] = useState("");

  const handleSubmit = async (e) => {
    e.preventDefault();
    setLoading(true);

    try {
      // client.js injects a hidden behavior_nonce input into the form —
      // read it from the form data (there is no global SilentShield object).
      const formData = new FormData(e.currentTarget);
      const nonce = formData.get("behavior_nonce");

      // Verify on your backend
      const res = await fetch("/api/verify", {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({ nonce }),
      });

      const data = await res.json();

      if (res.ok && data.success) {
        setMessage("Successfully verified!");
        // Process form submission
      } else {
        setMessage("Bot detected. Please try again.");
      }
    } catch (error) {
      console.error("Verification failed:", error);
      setMessage("Verification failed. Please try again.");
    } finally {
      setLoading(false);
    }
  };

  return (
    <form onSubmit={handleSubmit}>
      <input type="email" placeholder="Email" required />
      <button type="submit" disabled={loading}>
        {loading ? "Verifying..." : "Submit"}
      </button>
      {message && <p>{message}</p>}
    </form>
  );
}

Backend verification (Next.js)

// app/api/verify/route.ts
import { SilentShield } from "@forge12interactive/silentshield-sdk-js";

export async function POST(req: Request) {
  const { nonce } = await req.json();
  const result = await SilentShield.verifyNonce(nonce, process.env.SILENTSHIELD_API_KEY);
  const human = result.ok && result.verdict === "human" && result.confidence >= 0.7;

  if (!human) {
    return Response.json({ error: "Bot detected" }, { status: 403 });
  }

  // Human — process the form
  return Response.json({ success: true });
}

How SilentShield works in React

SilentShield loads a small client script that runs an invisible check while a user interacts with your form. On submit, your React or Next.js component sends the generated token to your backend, where you verify it with the @forge12interactive/silentshield-sdk-js package. Users never see a puzzle, and your bundle stays light because there is no heavy widget to render.

Client script plus server verification

There is no separate @silentshield/react web package to install — SilentShield works in any React or Next.js app through the client script and a server-side verify. You add the script https://api.silentshield.io/client.js?k=YOUR_API_KEY, read the token in your component, and confirm it against https://api.silentshield.io/v1/verify using the api-key header from a route handler or API route.

Setup walkthrough

Create an account and copy your API key. Add the SilentShield client script to your app and capture the token when the form is submitted. Install @forge12interactive/silentshield-sdk-js on your server, create the client with your API key, and call verify with the token. If the result is human, process the request; otherwise reject it.

Privacy and accessibility by default

SilentShield stores no cookies, performs no tracking and collects no personal data, so your app stays GDPR-compliant. Verification runs on EU-only infrastructure by default. The invisible check meets WCAG 2.1 AA, which keeps your forms usable for keyboard and screen-reader users without any visual challenge.

Integrate with React now

Add the script, verify with @forge12interactive/silentshield-sdk-js — ready in minutes.

Frequently asked questions

How do I add a CAPTCHA to a React app?

Load the SilentShield client script `https://api.silentshield.io/client.js?k=YOUR_API_KEY` in your React or Next.js app, obtain a nonce on submit, and verify it on your backend at `https://api.silentshield.io/v1/verify` using the `@forge12interactive/silentshield-sdk-js` SDK. There is no separate React web package — the client script plus backend verification is the pattern.

Is there a SilentShield React package?

There is no separate React web package. In React and Next.js you add the client script `https://api.silentshield.io/client.js?k=YOUR_API_KEY` and verify the injected `behavior_nonce` on your backend — with a few lines of fetch or the official `@forge12interactive/silentshield-sdk-js` package. A React Native SDK for mobile apps is currently available on request (early access).

How does SilentShield work with Next.js?

In Next.js, include the SilentShield client script in your pages, then verify the nonce server-side — in a route handler or API route — with the `@forge12interactive/silentshield-sdk-js` SDK, calling `https://api.silentshield.io/v1/verify` with the `api-key` header. This protects forms invisibly with a single API key.

Does SilentShield support React Native?

A React Native SDK for mobile apps is currently in early access — request it via [email protected]. Backend verification works today with `@forge12interactive/silentshield-sdk-js` or a plain HTTP call to `https://api.silentshield.io/v1/verify`, blocking automated abuse without showing users an image puzzle.

Is SilentShield GDPR-compliant in a React app?

Yes. Regardless of framework, SilentShield hosts data in the EU by default, sets no cookies, does no tracking, and stores only pseudonymised data. Your React frontend loads a single client script and your backend verifies the nonce — no personally identifiable information is stored.

Does SilentShield add much overhead to a React app?

No. SilentShield loads one lightweight client script and has no image assets to download. Verification happens through behavioral signals and a proof-of-work nonce, checked on your backend, with no third-party tracking calls — so it adds minimal overhead to your React or Next.js app.