A Vue 3 component for showing the Cloudflare Turnstile widget on your project.
Cloudflare Turnstile is a CAPTCHA alternative from Cloudflare. It uses PAT protocol to verify the user’s devices, preventing bots and malicious users from accessing your site and ensuring your and your visitors’ privacy is protected.
Introduction for Cloudflare Turnstile
Telegram Watchdog is a Telegram bot used for anti-abuse from Telegram group chats.
Get into Telegram Watchdog community to give a try
yarn add cfturnstile-vue3
# or
npm install cfturnstile-vue3
<script setup lang="ts">
import Turnstile from 'cfturnstile-vue3'
const sitekey = import.meta.env.VITE_SITEKEY as string
</script>
<template>
<Turnstile
:sitekey="sitekey"
@callback="e => console.log('success', e)"
size="compact"
/>
</template>
Refer to official document for all configurations.
We aligned the configuration parameters with the official widget document in version 2.0.0, which is disruptive for existing v1.0.0 users. Please remember to update the parameters to ensure that the widget works as normal.