grecaptcha
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/grecaptcha package

    1.0.3 • Public • Published

    grecaptcha

    reCAPTCHA v3 / v2 client for Node

    GitHub | NPM

    Install

    npm i grecaptcha

    Usage in async context

    const Grecaptcha = require('grecaptcha')
     
    const client = new Grecaptcha('secret')
     
    if (await client.verify('token')) {
        // reCAPTCHA response was accepted!
    }
    else {
        // reCAPTCHA token denied.
    }

    Usage in non-async context

    const client = new Grecaptcha('secret')
     
    client.verify('token').then((accepted) => {
        if (accepted) {
            // reCAPTCHA response was accepted!
        }
        else {
            // reCAPTCHA token denied.
        }
    }).catch((err) =>  {
        // Request failed.
    })

    Install

    npm i grecaptcha

    DownloadsWeekly Downloads

    839

    Version

    1.0.3

    License

    SEE LICENSE IN LICENSE.md

    Unpacked Size

    3.26 kB

    Total Files

    4

    Last publish

    Collaborators

    • ethan_