@boywithkeyboard/turnstile
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

turnstile

[!IMPORTANT]
Please read this article to learn more.

Setup

Deno

import { turnstile } from 'https://esm.sh/@boywithkeyboard/turnstile'

Node.js

npm i @boywithkeyboard/turnstile
import { turnstile } from '@boywithkeyboard/turnstile'

Usage

async function handleRequest(req) {
  const body = await req.formData()

  const result = await turnstile.verify({
    secret: '...',
    response: body.get('cf-turnstile-response'),
    ip: req.headers.get('cf-connecting-ip')
  })
}

Package Sidebar

Install

npm i @boywithkeyboard/turnstile

Weekly Downloads

442

Version

2.0.0

License

MIT

Unpacked Size

5.25 kB

Total Files

5

Last publish

Collaborators

  • sakuta96