I’ve implemented the Turnstile widget as shown above and attached callback functions (@success, @error, and @expired) to monitor token generation or any relevant messages. However, none of these callbacks seem to trigger.
The widget is visible on the UI.
The nuxt.config.ts file is configured correctly according to the official documentation.
I’ve tried using the mock tokens provided by Cloudflare, including the one that forces an interactive challenge.
I’ve added localhost as a valid hostname in Cloudflare’s Hostname Management.
I've also tried using v-model directive
The problem is:
When I interact with the widget (e.g., checking the checkbox), no network requests are initiated, and the callbacks are not triggered.
Any ideas on what I might be doing wrong? Could it be related to a missing configuration or an issue with how Turnstile is being rendered locally?
đź“š What are you trying to do?
Trying to fetch token after user checks the widget, in the development mode using mocked site key for testing.
🔍 What have you tried?
<NuxtTurnstile @success="onCaptchaSuccess" @error="onCaptchaError" @expired="onCaptchaExpired" v-model="captchaToken" ref="turnstile" />
Hello,
I’ve implemented the Turnstile widget as shown above and attached callback functions (@success, @error, and @expired) to monitor token generation or any relevant messages. However, none of these callbacks seem to trigger.
The widget is visible on the UI. The nuxt.config.ts file is configured correctly according to the official documentation. I’ve tried using the mock tokens provided by Cloudflare, including the one that forces an interactive challenge. I’ve added localhost as a valid hostname in Cloudflare’s Hostname Management. I've also tried using v-model directive
The problem is: When I interact with the widget (e.g., checking the checkbox), no network requests are initiated, and the callbacks are not triggered. Any ideas on what I might be doing wrong? Could it be related to a missing configuration or an issue with how Turnstile is being rendered locally?
Thanks for your help!
ℹ️ Additional context
No response