We’ve released a new plugin to use Cloudflare Turnstile in your apps to protect your login forms or contact forms.
Link to Plugin: Cloudflare Turnstile Plugin | Bubble
Link to Demo: https://relevat-digital.bubbleapps.io/version-test/turnstile
Link to Editor: Relevat Digital | Bubble Editor
Link to Docs: Cloudflare Turnstile · Cloudflare Turnstile docs
After you’ve setup your site in Cloudflare, add the relevant information back to your Bubble app: Site Key (in the element), Secret Key (in the plugin setting).
Once Turnstile has been initialized it will give you a Token. This Token must be validated against the siteverify endpoint, using the “Verify Turnstile Token” action. This action will return a “Success” state which is either True or False. A token can only be validated once and cannot be consumed twice. As soon as the Current Token expires Turnstile will generate a new one, and the whole action restarts.