@coolgk/captcha
a javascript / typescript module
npm install @coolgk/captcha
recapcha wrapper
Report bugs here: https://github.com/coolgk/node-utils/issues
Examples
const { verify } = require('@coolgk/captcha');
const secret = '-------';
verify(secret, captchaResponse).then((response) => {
console.log(response);
});
import { Captcha } from '@coolgk/captcha';
const captcha = new Captcha({ secret });
const captchaResponse = '---------';
captcha.verify(captchaResponse).then((response) => {
console.log(response);
});
Captcha
Kind: global class
new Captcha(options)
captcha.verify(response, [remoteip])
Kind: instance method of Captcha
Param | Type | Description |
---|
response | string | repsonse from recaptcha |
[remoteip] | string | ip address |
| promise | |