Giter Site home page Giter Site logo

cfturnstile-vue3's Introduction

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)
    }
  }
})
</script>

cfturnstile-vue3's People

Contributors

astrian avatar codespearhead avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cfturnstile-vue3's Issues

Option to re-run turnstile?

Hi, is there any option or way to make the component re-run?

I am in the following scenario:

  • User submits a form, then decides to send another one (same component)
  • Even by updating the key of the Turnstile component, the challenge doesn't re-run so I don't get a new token

Getting a new token for the second request is needed because a token can only be used for 1 request, then it becomes invalid.

Is there any way I could achieve this?

cfturnstile component does not exist

In your README you describe how to use the cfturnstile.

<cfturnstile
      :sitekey="sitekey"
      @verify="verify"
    />

However, this compoment is not what you are importing. Did you mean Turnstile?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.