Verify Captcha

UmstiegSwitching

Von reCAPTCHA oder Turnstile umsteigen, ohne die Seite anzufassenSwitch from reCAPTCHA or Turnstile without touching the page

Diese Formulare sind für Google reCAPTCHA und Cloudflare Turnstile geschrieben. Nur die Script-URL und der Site-Key sind anders – Markup, Callbacks und Formularfelder bleiben. Auf dem Server derselbe Tausch: Verify-URL und Secret.

These forms are written for Google reCAPTCHA and Cloudflare Turnstile. Only the script URL and the site key differ – the markup, the callbacks and the form fields are theirs. On the server, the same swap: the verify URL and the secret.

reCAPTCHA-v2-MarkupreCAPTCHA v2 markup

Was sich in der Seite ändertWhat changes in the page

<script src="https://www.google.com/recaptcha/api.js">
<script src="https://captcha.l11next.com/v1/recaptcha-compat.js">

<div class="g-recaptcha"
     data-sitekey="l11v_pub_…"
     data-callback="onRecaptcha"></div>

Live, mit genau diesem MarkupLive, with that markup

onRecaptcha(token) → noch nicht aufgerufennot called yet

Turnstile-MarkupTurnstile markup

Was sich in der Seite ändertWhat changes in the page

<script src="https://challenges.cloudflare.com/turnstile/v0/api.js">
<script src="https://captcha.l11next.com/v1/turnstile-compat.js">

<div class="cf-turnstile"
     data-sitekey="l11v_pub_…"
     data-callback="onTurnstile"></div>

Live, mit genau diesem MarkupLive, with that markup

onTurnstile(token) → noch nicht aufgerufennot called yet

Auf dem ServerOn the server

Der Verify-Aufruf behält seine Form: secret und response als Formular, eine JSON-Antwort mit success und error-codes.The verify call keeps its shape: form-encoded secret and response, a JSON answer with success and error-codes.

POST https://www.google.com/recaptcha/api/siteverify
POST https://challenges.cloudflare.com/turnstile/v0/siteverify
POST https://captcha.l11next.com/v1/siteverify
  secret=l11v_sec_…&response=<token>