Skip to content

A Vue 3 component for showing the Cloudflare Turnstile widget on your project.

License

Notifications You must be signed in to change notification settings

sexnine/cfturnstile-vue3

 
 

Repository files navigation

Cloudflare Turnstile Widget Component for Vue 3

A Vue 3 component for showing the Cloudflare Turnstile widget on your project.

What is Cloudflare Turnstile?

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

Showcases

Telegram Watchdog is a Telegram bot used for anti-abuse from Telegram group chats.

Get into Telegram Watchdog community to give a try

Installation & Usage

yarn add cfturnstile-vue3
# or
npm install cfturnstile-vue3
<template>
  <div id="app">
    <cfturnstile
      :sitekey="sitekey"
      @verify="verify"
    />
  </div>
</template>
<script>
import { defineComponent } from 'vue'
import Turnstile from 'cfturnstile-vue3'

export default defineComponent({
  name: 'App',
  components: {
    Turnstile
  },
  data() {
    return {
      sitekey: 'YOUR_SITE_KEY'
    }
  },
  methods: {
    verify(token) {
      console.log(token)
    }
  }
})
</scirpt>

About

A Vue 3 component for showing the Cloudflare Turnstile widget on your project.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 56.3%
  • TypeScript 31.9%
  • HTML 11.8%