Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 578 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 578 Bytes

node-cfturnstile

Modified version of node-hcaptcha to work with Cloudflare Turnstile (WORK IN PROGRESS)

Install

npm install --save cfturnstile

Usage

const {verify} = require('cfturnstile');

const secret = 'my Turnstile secret from the Cloudflare dashboard';
const token = 'token from widget';

verify(secret, token)
  .then((data) => {
    if (data.success === true) {
      console.log('success!', data);
    } else {
      console.log('verification failed');
    }
  })
  .catch(console.error);
  
  h