Turnstile Captcha
Klub integrates Cloudflare Turnstile for bot protection on login and signup flows. Use this page if you want managed bot protection with Cloudflare.
Configuration
<?php
return [
'bnomei.klub.turnstile.sitekey' => fn() => env('TURNSTILE_SITE_KEY'),
'bnomei.klub.turnstile.secretkey' => fn() => env('TURNSTILE_SECRET_KEY'),
];
The Turnstile response is read from cf-turnstile-response in the request.
Rendering the widget
Use the bundled snippets:
<?php snippet('klub/turnstile/widget') ?>
And include the hidden response field in your form:
<?php snippet('klub/turnstile/form') ?>
Verification
When enabled, klub()->turnstile() validates the response against the Turnstile API during login and signup.