Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethanent/grecaptcha
reCAPTCHA client for Node
https://github.com/ethanent/grecaptcha
javascript node nodejs npm npm-package recaptcha recaptcha-api recaptcha-verification recaptchav2
Last synced: 1 day ago
JSON representation
reCAPTCHA client for Node
- Host: GitHub
- URL: https://github.com/ethanent/grecaptcha
- Owner: ethanent
- License: other
- Created: 2018-01-04T02:13:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-29T14:16:29.000Z (about 1 year ago)
- Last Synced: 2024-10-28T04:49:16.270Z (11 days ago)
- Topics: javascript, node, nodejs, npm, npm-package, recaptcha, recaptcha-api, recaptcha-verification, recaptchav2
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# grecaptcha
> reCAPTCHA v3 / v2 client for Node[GitHub](https://github.com/ethanent/grecaptcha) | [NPM](https://www.npmjs.com/package/grecaptcha)
## Install
```shell
npm i grecaptcha
```## Usage in async context
```javascript
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
```javascript
const client = new Grecaptcha('secret')client.verify('token').then((accepted) => {
if (accepted) {
// reCAPTCHA response was accepted!
}
else {
// reCAPTCHA token denied.
}
}).catch((err) => {
// Request failed.
})
```