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.
Great plugin, however I have some issue with reset option. I’m implementing this in my app to protect my Signup and Login forms. Initially, I had Turnstile on both forms, but I ran into issues where it wouldn’t reset the widget when switching between the two.
When switching between Signup and Login, the Turnstile widget doesn’t reset properly.
If I reset Turnstile on the Login page, it works, but it doesn’t reset when switching back to Signup (and vice versa).
Only a full page reload resets the widget.
Any ideas?
If you use multiple Turnstile you’d want to reset each with the “Reset Turnstile” action and choose the relevant element. The element also resets automatically when the token expires usually 2 minutes.