turnstile-spin
Set up, repair, or migrate to Cloudflare Turnstile bot verification in an existing frontend and backend, including server-side Siteverify.
Install
npx skills add https://github.com/cloudflare/skills --skill turnstile-spinNext.js (Pages Router)
For older Next.js projects using pages/ rather than app/. The widget renders client-side; siteverify lives in the API route.
This native form navigates to the API response, so it does not need client-side reset code.
API route (canonical siteverify):
signup is the stable action for this surface. Preserve an existing custom migration action and compare the returned action to the same value. Siteverify is mandatory for every widget mode, including pre-clearance. Set TURNSTILE_HOSTNAMES to the deployment-specific frontend hostnames; a production value must not include localhost or 127.0.0.1.