{"_id":"next-turnstile","_rev":"10-d188f555b41c3dbe93e62a0fd03705ea","name":"next-turnstile","dist-tags":{"latest":"1.0.7"},"versions":{"0.1.0":{"name":"next-turnstile","version":"0.1.0","keywords":["next","nextjs","react","cloudflare","turnstile","captcha","verification"],"author":{"name":"Jed Patterson"},"license":"MIT","_id":"next-turnstile@0.1.0","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"homepage":"https://github.com/jedpattersonn/next-turnstile#readme","bugs":{"url":"https://github.com/jedpattersonn/next-turnstile/issues"},"dist":{"shasum":"acd46f86ff8c343f59ed4c505506652130686c54","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-0.1.0.tgz","fileCount":8,"integrity":"sha512-T6U2LEG9wb2Bc4fsJlmFYOMjhew785eIgvfbBE5XlQvHVB4lfWgxinEq28kqkma2dhVIsEPTPmsosN2F25hVEQ==","signatures":[{"sig":"MEQCIHnBakOUmbkRalIkfyOQzD5eYHGanbufuwOuNN2MC5H9AiBg/V9/0u7wMgE58TkJLIYTs8xojVpVYN4+f2m4Zz1N6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24182},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"9ce405179933a48902025cedce6ff8bbf496fa3d","scripts":{"dev":"tsup --watch","lint":"eslint src/**/*.ts*","test":"jest","build":"tsup","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"repository":{"url":"git+https://github.com/jedpattersonn/next-turnstile.git","type":"git"},"_npmVersion":"10.8.2","description":"A Next.js component for Cloudflare Turnstile with built-in validation and sandbox mode","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.0.0","@swc/core":"^1.7.40","@swc/jest":"^0.2.36","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@types/react":"^18.2.0","eslint-config-next":"^14.0.0","eslint-plugin-react":"^7.0.0","@testing-library/react":"^14.3.1","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.6.2","@typescript-eslint/parser":"^6.0.0","eslint-plugin-react-hooks":"^4.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"next":">=13.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_0.1.0_1729994116372_0.7936655561866011","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"next-turnstile","version":"0.1.1","keywords":["next","nextjs","react","cloudflare","turnstile","captcha","verification"],"author":{"name":"Jed Patterson"},"license":"MIT","_id":"next-turnstile@0.1.1","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"homepage":"https://github.com/jedpattersonn/next-turnstile#readme","bugs":{"url":"https://github.com/jedpattersonn/next-turnstile/issues"},"dist":{"shasum":"c652e9a86f0341926f7a079a39679a5fc629cdb4","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-0.1.1.tgz","fileCount":8,"integrity":"sha512-vb0/tXAKGvGbMZiyXa/wZRYF3qZDj3xnh1Ij9Y60eQwHh9epOg4USQoiJjP7CfUhaptMzyYiTkXIILe/XgDvQw==","signatures":[{"sig":"MEUCIQD+F+93/SbXExkz9p3NWX9xzTON+WCjteSIW1njyUfHUAIgBoh+elf8egecvzhG1ovYxd9/EdqO98JrBkrn/ihqcUs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25866},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"9ce405179933a48902025cedce6ff8bbf496fa3d","scripts":{"dev":"tsup --watch","lint":"eslint src/**/*.ts*","test":"jest","build":"tsup","clean":"rm -rf dist","test:watch":"jest --watch","test:coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"repository":{"url":"git+https://github.com/jedpattersonn/next-turnstile.git","type":"git"},"_npmVersion":"10.8.2","description":"A Next.js component for Cloudflare Turnstile with built-in validation and sandbox mode","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tsup":"^8.0.0","eslint":"^8.0.0","@swc/core":"^1.7.40","@swc/jest":"^0.2.36","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@types/react":"^18.2.0","eslint-config-next":"^14.0.0","eslint-plugin-react":"^7.0.0","@testing-library/react":"^14.3.1","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.6.2","@typescript-eslint/parser":"^6.0.0","eslint-plugin-react-hooks":"^4.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"next":">=13.0.0","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_0.1.1_1729994361088_0.4824079037624067","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"next-turnstile","version":"1.0.0","keywords":["nextjs","cloudflare","turnstile","captcha","react"],"_id":"next-turnstile@1.0.0","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"dist":{"shasum":"edd1e8dcfdf8c28870d0f3cddccbd409f21ad251","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.0.tgz","fileCount":19,"integrity":"sha512-cc7R68yE14LC9Ajyy6+dQrkVDBjYZhE81UC142IqVNs5kflkkLYZAnLKJff2pBJnrkveTqP9h9uIs8AeqjCvZA==","signatures":[{"sig":"MEQCIGGTn2xjUnwdjTRSZYWuxiXPE7sxE/V8SPZRUdVw6Q/yAiBQuxP8zHEY7yQgZf98IhOOtO3D93ptLVzen/D3TUiqWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25029},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"bc3e9c96a8032fb52af5a1d41c26c0d7cc09f897","scripts":{"lint":"eslint src/**/*.ts*","test":"jest","build":"tsc"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"_npmVersion":"10.8.2","description":"Cloudflare Turnstile integration for Next.js applications","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","typescript":"^4.9.0","@types/react":"^18.0.0","@typescript-eslint/parser":"^5.0.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_1.0.0_1731439357099_0.22707462494386488","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"next-turnstile","version":"1.0.1","keywords":["nextjs","cloudflare","turnstile","captcha","react"],"_id":"next-turnstile@1.0.1","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"dist":{"shasum":"54b1af7eaff224554657384053426e7bea09d591","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.1.tgz","fileCount":20,"integrity":"sha512-CzH2OKvGXQgHA4FPOcM0GRGEGFAXVycXxw+/7OVkM9yowvw5n9u7gMhb7Dj0zcnenjTaBCm0RsSJYg99y3CTiw==","signatures":[{"sig":"MEYCIQCGUnhsH/7dV9Ed8zshWFNy+15LUg4ugN142j/hQ0PxEQIhALB07jtDTgsEVTrSD3IanUPRgt8f5gulZVb/NM5Dcoo0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25928},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"40f1bbd3ec779f16856022fa7ee9f799f9d855fd","scripts":{"lint":"eslint src/**/*.ts*","test":"jest","build":"tsc"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"_npmVersion":"10.8.2","description":"Cloudflare Turnstile integration for Next.js applications","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","typescript":"^4.9.0","@types/react":"^18.0.0","@typescript-eslint/parser":"^5.0.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_1.0.1_1736769804773_0.5840441274798964","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"next-turnstile","version":"1.0.2","keywords":["nextjs","cloudflare","turnstile","captcha","react"],"license":"MIT","_id":"next-turnstile@1.0.2","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"dist":{"shasum":"f1937d54ce4d272e20631bf8af3c960e5cf53c48","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.2.tgz","fileCount":20,"integrity":"sha512-PdCDkMQgJLGeTJpBz/cmmsKcysI0z+eN8uYab/8HuxWQ3i3NbhAfufE/Gw3ubXEd/xDezve/eVp+QBX3T7shOQ==","signatures":[{"sig":"MEUCIQDWra4sDEF6wKSYs9ve5SnhPr4DhxNFB5FMwIyin+cl/QIgRjloQRNjitaPSJvS/SrwJep9beGiQ14kHv007Sy47SU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25601},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"25ae1de3871c7ffc90c526172fc9cb97726f384c","scripts":{"lint":"eslint src/**/*.ts*","test":"jest","build":"tsc"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"_npmVersion":"10.8.2","description":"Cloudflare Turnstile integration for Next.js applications","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","typescript":"^4.9.0","@types/react":"^18.0.0","@typescript-eslint/parser":"^5.0.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_1.0.2_1738760549380_0.18263269980391006","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"next-turnstile","version":"1.0.3","keywords":["nextjs","cloudflare","turnstile","captcha","react"],"license":"MIT","_id":"next-turnstile@1.0.3","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"dist":{"shasum":"4ee0724bea84cf39e0bce8ebf94595d105072568","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.3.tgz","fileCount":20,"integrity":"sha512-ys8nbKDs78O6oJDOY4OwaFjhZBods4sV3qpz5qSIH0XxxN934X677bMhKIqZ1xcbQ8byjJm1ZA6znPxemVeVSw==","signatures":[{"sig":"MEQCIDKHV8dX2G3msX1qtuRKCJhcjWERqKn6qY8K8ddh0r9gAiAHOqId9Vnyr4bX5lB7/rG2+gESXyQ58Rv0P0afKUJK1g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27392},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"531350d7605007fbee983a966516f007cb975187","scripts":{"lint":"eslint src/**/*.ts*","test":"jest","build":"tsc"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"_npmVersion":"10.8.2","description":"Cloudflare Turnstile integration for Next.js applications","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","typescript":"^4.9.0","@types/react":"^18.0.0","@typescript-eslint/parser":"^5.0.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_1.0.3_1746216361881_0.4752724012490528","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"next-turnstile","version":"1.0.4","keywords":["nextjs","cloudflare","turnstile","captcha","react"],"license":"MIT","_id":"next-turnstile@1.0.4","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"dist":{"shasum":"4d53bd7129299d93309a59e6e979e272ce508349","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.4.tgz","fileCount":20,"integrity":"sha512-avaYE3rKabWBRZmJeGB5Z8oim0OliBQQRpvAQk3tZej0Gh8XJA3LU5f1a9Z9j2Cr8OlRmvV9+XGBMFFt3P6G6w==","signatures":[{"sig":"MEYCIQDA0UlUc3DUdpzUZOpGMRE/RuqHRtSp5vFGpKDjVDXbWwIhAK2xsFUxqcNbxpF3TFMZabDFqONg0DwcPEFpQLG35kYh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28451},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"7c57774ffc8424631f9189d23e08e4ada4d5320d","scripts":{"lint":"eslint src/**/*.ts*","test":"jest","build":"tsc"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"_npmVersion":"10.8.2","description":"Cloudflare Turnstile integration for Next.js applications","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","typescript":"^4.9.0","@types/react":"^18.0.0","@typescript-eslint/parser":"^5.0.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_1.0.4_1746451432050_0.27265915109020833","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"next-turnstile","version":"1.0.5","keywords":["nextjs","cloudflare","turnstile","captcha","react"],"author":{"name":"Jed Patterson"},"license":"MIT","_id":"next-turnstile@1.0.5","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"contributors":[{"name":"Jed Patterson","email":"jed@jedpatterson.com"}],"homepage":"https://github.com/JedPattersonn/next-turnstile","bugs":{"url":"https://github.com/JedPattersonn/next-turnstile/issues"},"dist":{"shasum":"c4881cc3b1ac440e50343467697f178e2dcbf6be","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.5.tgz","fileCount":20,"integrity":"sha512-DUdmQ0m4lSkHD2nn/Nmh8nAKjYlZD9nXJTaQJJAr0pYE0MUHmwz8bvjex71RuVJaoGRsP7qGnlhuEnXDEuojcw==","signatures":[{"sig":"MEQCIAKuwLk6CbesMx9I3jmeSZObg0uRkqPeDAHMza+NULLxAiANDTEkujme7zSKJGphjZYb7sAVQhtweMVIJmfycRItGw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28805},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"b6a6fd2432f011a661242e6c098792d13c75b6ca","scripts":{"lint":"eslint src/**/*.ts*","test":"jest","build":"tsc"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"repository":{"url":"git+https://github.com/JedPattersonn/next-turnstile.git","type":"git"},"_npmVersion":"10.8.2","description":"Cloudflare Turnstile integration for Next.js applications","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","typescript":"^4.9.0","@types/react":"^18.0.0","@typescript-eslint/parser":"^5.0.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_1.0.5_1748083476152_0.10524905777525895","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"next-turnstile","version":"1.0.6","keywords":["nextjs","cloudflare","turnstile","captcha","react"],"author":{"name":"Jed Patterson"},"license":"MIT","_id":"next-turnstile@1.0.6","maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"contributors":[{"name":"Jed Patterson","email":"jed@jedpatterson.com"}],"homepage":"https://github.com/JedPattersonn/next-turnstile","bugs":{"url":"https://github.com/JedPattersonn/next-turnstile/issues"},"dist":{"shasum":"ae10d555a259af1e01e68ecc42f9f46d15294c98","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.6.tgz","fileCount":20,"integrity":"sha512-2cAucZSPLGEjA6DoZ3Ix7DRTlqYbSwAv964s6xc1kqDk3ACzOR7vHDxZyhzP/6bkjKWX1ynYCsT27bJLSGuiog==","signatures":[{"sig":"MEQCIExI8bU5gJnhcNCvYv3ex2EQxhp9Z14auc1r2SsH1OmsAiAvZ1rUwDzI9DRDo9WAqowl8rntYtrEIE9133wlfVRKCg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28821},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"b6a6fd2432f011a661242e6c098792d13c75b6ca","scripts":{"lint":"eslint src/**/*.ts*","test":"jest","build":"tsc"},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"repository":{"url":"git+https://github.com/JedPattersonn/next-turnstile.git","type":"git"},"_npmVersion":"10.8.2","description":"Cloudflare Turnstile integration for Next.js applications","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","eslint":"^8.0.0","typescript":"^4.9.0","@types/react":"^18.0.0","@typescript-eslint/parser":"^5.0.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"_npmOperationalInternal":{"tmp":"tmp/next-turnstile_1.0.6_1756647581686_0.17831237579120862","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"next-turnstile","version":"1.0.7","description":"Cloudflare Turnstile integration for Next.js applications","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","scripts":{"build":"tsc","test":"jest","lint":"eslint src/**/*.ts*"},"repository":{"type":"git","url":"git+https://github.com/JedPattersonn/next-turnstile.git"},"homepage":"https://github.com/JedPattersonn/next-turnstile","bugs":{"url":"https://github.com/JedPattersonn/next-turnstile/issues"},"author":{"name":"Jed Patterson"},"contributors":[{"name":"Jed Patterson","email":"jed@jedpatterson.com"}],"keywords":["nextjs","cloudflare","turnstile","captcha","react","typescript","security","bot-protection","verification"],"peerDependencies":{"next":">=12","react":">=16","react-dom":">=16"},"devDependencies":{"@types/react":"^18.0.0","@typescript-eslint/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^5.0.0","typescript":"^4.9.0","eslint":"^8.0.0","jest":"^29.0.0"},"_id":"next-turnstile@1.0.7","gitHead":"2129011ee5f0d0e5184cb49362496f619ee7eeb6","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-hN0fr5fwOiK0o8draaJmcYElDqsiYBd4OOCy+0IKMlJgjpPzxtoyagojPBoHsyw9i3jVoBpusPZcUMuKuKQsNw==","shasum":"1b6b7f58c1b31c3ac9a3c8c768c27fcbcd621fba","tarball":"https://registry.npmjs.org/next-turnstile/-/next-turnstile-1.0.7.tgz","fileCount":20,"unpackedSize":42324,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDjFcaCpvxmNrRWRZzr4SFoUjgWrkUB15BRX2/tDlSLMwIhAKtgNffil0bajNxrWosrh21T+wsWwlIgBwlmpIY6+ppR"}]},"_npmUser":{"name":"jedpatterson","email":"jedpatterson123@gmail.com"},"directories":{},"maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/next-turnstile_1.0.7_1756648747512_0.6311034581193744"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-27T01:55:16.371Z","modified":"2025-08-31T13:59:07.915Z","0.1.0":"2024-10-27T01:55:16.570Z","0.1.1":"2024-10-27T01:59:21.271Z","1.0.0":"2024-11-12T19:22:37.339Z","1.0.1":"2025-01-13T12:03:25.005Z","1.0.2":"2025-02-05T13:02:29.665Z","1.0.3":"2025-05-02T20:06:02.056Z","1.0.4":"2025-05-05T13:23:52.208Z","1.0.5":"2025-05-24T10:44:36.373Z","1.0.6":"2025-08-31T13:39:41.870Z","1.0.7":"2025-08-31T13:59:07.708Z"},"bugs":{"url":"https://github.com/JedPattersonn/next-turnstile/issues"},"author":{"name":"Jed Patterson"},"license":"MIT","homepage":"https://github.com/JedPattersonn/next-turnstile","keywords":["nextjs","cloudflare","turnstile","captcha","react","typescript","security","bot-protection","verification"],"repository":{"type":"git","url":"git+https://github.com/JedPattersonn/next-turnstile.git"},"description":"Cloudflare Turnstile integration for Next.js applications","contributors":[{"name":"Jed Patterson","email":"jed@jedpatterson.com"}],"maintainers":[{"name":"jedpatterson","email":"jedpatterson123@gmail.com"}],"readme":"# Next-Turnstile\n\nA type-safe, feature-rich integration of Cloudflare Turnstile for Next.js applications. This package provides both client and server-side components for seamless CAPTCHA integration.\n\n[![npm version](https://badge.fury.io/js/next-turnstile.svg)](https://www.npmjs.com/package/next-turnstile)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Features\n\n- 🔒 **Type-safe**: Full TypeScript support\n- 🎨 **Customizable**: Extensive styling and behavior options\n- 🧪 **Sandbox Mode**: Built-in support for development testing\n- ⚡ **Server Validation**: Easy token verification\n- 📱 **Responsive**: Works across all device sizes\n- 🔄 **Auto-reload**: Configurable token refresh\n- 🌙 **Theme Support**: Light, dark, and auto themes\n- 🌐 **i18n Ready**: Multiple language support\n\n## Installation\n\n```bash\n# npm\nnpm install next-turnstile\n\n# yarn\nyarn add next-turnstile\n\n# pnpm\npnpm add next-turnstile\n\n# bun\nbun add next-turnstile\n```\n\n## Quick Start\n\n### Client-Side Usage\n\n```tsx\nimport { Turnstile } from \"next-turnstile\";\n\nfunction MyForm() {\n  const handleVerify = (token: string) => {\n    // Handle the verification token\n    console.log(\"Verification successful:\", token);\n  };\n\n  return (\n    <Turnstile siteKey=\"your-site-key\" onVerify={handleVerify} theme=\"light\" />\n  );\n}\n```\n\n### Server-Side Validation\n\n```tsx\nimport { validateTurnstileToken } from \"next-turnstile\";\n\nasync function validateToken(token: string) {\n  try {\n    const result = await validateTurnstileToken({\n      token,\n      secretKey: process.env.TURNSTILE_SECRET_KEY,\n    });\n\n    if (result.success) {\n      // Token is valid\n      return true;\n    }\n  } catch (error) {\n    console.error(\"Validation failed:\", error);\n  }\n  return false;\n}\n```\n\n## API Reference\n\n### Turnstile Component Props\n\n| Prop                  | Type                                                                    | Default                   | Description                                   |\n| --------------------- | ----------------------------------------------------------------------- | ------------------------- | --------------------------------------------- |\n| `siteKey`             | `string`                                                                | Required                  | Your Cloudflare Turnstile site key            |\n| `onVerify`            | `(token: string) => void`                                               | -                         | Callback when verification succeeds           |\n| `onError`             | `(error: unknown) => void`                                              | -                         | Callback when an error occurs                 |\n| `onExpire`            | `() => void`                                                            | -                         | Callback when the token expires               |\n| `onLoad`              | `() => void`                                                            | -                         | Callback when the widget loads                |\n| `onBeforeInteractive` | `() => void`                                                            | -                         | Callback before challenge enters interactive  |\n| `onAfterInteractive`  | `() => void`                                                            | -                         | Callback after challenge leaves interactive   |\n| `onUnsupported`       | `() => void`                                                            | -                         | Callback when browser is not supported        |\n| `onTimeout`           | `() => void`                                                            | -                         | Callback when interactive challenge times out |\n| `action`              | `string`                                                                | -                         | Custom action value for analytics             |\n| `theme`               | `'light' \\| 'dark' \\| 'auto'`                                           | `'auto'`                  | Widget theme                                  |\n| `size`                | `'normal' \\| 'compact' \\| 'flexible'`                                   | `'flexible'`              | Widget size                                   |\n| `appearance`          | `'always' \\| 'execute' \\| 'interaction-only'`                           | `'always'`                | When to show the widget                       |\n| `execution`           | `'render' \\| 'execute'`                                                 | `'render'`                | When to execute the challenge                 |\n| `retry`               | `'auto' \\| 'never'`                                                     | `'auto'`                  | Retry behavior on failure                     |\n| `retryInterval`       | `number`                                                                | `8000`                    | Milliseconds between retries                  |\n| `refreshExpired`      | `'auto' \\| 'manual' \\| 'never'`                                         | `'auto'`                  | Token refresh behavior                        |\n| `refreshTimeout`      | `'auto' \\| 'manual' \\| 'never'`                                         | `'auto'`                  | Timeout refresh behavior                      |\n| `language`            | `string`                                                                | -                         | Widget language code                          |\n| `tabIndex`            | `number`                                                                | -                         | Tab index for accessibility                   |\n| `responseField`       | `boolean`                                                               | `true`                    | Create hidden response input                  |\n| `responseFieldName`   | `string`                                                                | `'cf-turnstile-response'` | Name of the response input field              |\n| `cData`               | `string`                                                                | -                         | Custom data payload                           |\n| `feedbackEnabled`     | `boolean`                                                               | `true`                    | Enable visitor feedback collection            |\n| `id`                  | `string`                                                                | `'turnstile-widget'`      | Container element ID                          |\n| `className`           | `string`                                                                | -                         | Additional CSS classes                        |\n| `sandbox`             | `boolean` \\| `pass` \\| `block` \\| `pass-invisible` \\| `block-invisible` | `false`                   | Enable sandbox mode                           |\n\n### Server Validation Options\n\n| Option           | Type                                    | Required | Description               |\n| ---------------- | --------------------------------------- | -------- | ------------------------- |\n| `token`          | `string`                                | Yes      | The token from the client |\n| `secretKey`      | `string`                                | Yes      | Your Turnstile secret key |\n| `remoteip`       | `string`                                | No       | User's IP address         |\n| `idempotencyKey` | `string`                                | No       | Unique request identifier |\n| `sandbox`        | `boolean`\\| `pass` \\| `fail` \\| `error` | No       | Enable sandbox mode       |\n\n## Advanced Usage\n\n### With Form Submission\n\n```tsx\nimport { Turnstile } from \"next-turnstile\";\n\nexport default function Form() {\n  const [token, setToken] = useState<string>();\n\n  const handleSubmit = async (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!token) return;\n\n    const response = await fetch(\"/api/submit\", {\n      method: \"POST\",\n      body: JSON.stringify({ token }),\n      headers: { \"Content-Type\": \"application/json\" },\n    });\n\n    // Handle response...\n  };\n\n  return (\n    <form onSubmit={handleSubmit}>\n      <input type=\"email\" required />\n      <Turnstile\n        siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY!}\n        onVerify={setToken}\n      />\n      <button type=\"submit\" disabled={!token}>\n        Submit\n      </button>\n    </form>\n  );\n}\n```\n\n### Server Action Validation\n\n```tsx\nimport { validateTurnstileToken } from \"next-turnstile\";\n\nasync function submitForm(formData: FormData) {\n  \"use server\";\n\n  const token = formData.get(\"cf-turnstile-response\");\n  if (!token || typeof token !== \"string\") {\n    return { error: \"No token provided\" };\n  }\n\n  const result = await validateTurnstileToken({\n    token,\n    secretKey: process.env.TURNSTILE_SECRET_KEY!,\n  });\n\n  if (!result.success) {\n    return { error: \"Invalid token\" };\n  }\n\n  // Process form submission...\n}\n```\n\n### Development Mode\n\nDuring development, you can use sandbox mode to test without real credentials:\n\n```tsx\n<Turnstile\n  siteKey=\"1x00000000000000000000AA\"\n  sandbox={process.env.NODE_ENV === \"development\"}\n  onVerify={handleVerify}\n/>\n```\n\n### Dark Mode Support\n\n```tsx\n<Turnstile\n  siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY!}\n  theme=\"dark\"\n  onVerify={handleVerify}\n/>\n```\n\n### With Custom Styling\n\n```tsx\n<Turnstile\n  siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY!}\n  className=\"my-turnstile-widget\"\n  onVerify={handleVerify}\n/>\n\n<style>\n  .my-turnstile-widget {\n    margin: 1rem 0;\n    /* Note: Internal widget styling is limited by Turnstile */\n  }\n</style>\n```\n\n## Development and Contributing\n\n1. Clone the repository\n2. Install dependencies:\n   ```bash\n   pnpm install\n   ```\n3. Start development:\n   ```bash\n   pnpm dev\n   ```\n\n## License\n\nMIT © Jed Patterson\n\n## Credits\n\nBuilt with ❤️ using:\n\n- [Next.js](https://nextjs.org)\n- [Cloudflare Turnstile](https://developers.cloudflare.com/turnstile)\n- [TypeScript](https://www.typescriptlang.org)\n","readmeFilename":"README.md"}