@netacea/captchafeedback
v5.2.79
Published
CAPTCHA feedback module to send CAPTCHA results back to Netacea.
Downloads
33
Readme
Netacea CAPTCHA Feedback
@netacea/captchafeedback
is a package designed to add Netacea CAPTCHA feedback functionality to your NodeJS based origin server.
Installation
NPM
npm i @netacea/captchafeedback --save
Yarn
yarn add @netacea/captchafeedback
Usage
import Netacea from '@netacea/captchafeedback'
const netacea = new Netacea({
apiKey: 'your-api-key',
secretKey: 'your-secret-key'
})
const { cookies } = await netacea.updateCaptcha({
clientIp: 'client-ip', // Client's real IP address
cookieHeader: 'cookie-header', // Incoming cookie header value
eventId: 'captcha-page-event-id', // X-Netacea-Event-ID received when captcha was served
result: true, // Result from captcha
userAgent: 'client-user-agent' // Client's user-agent
})
// TODO: Add the returned cookies to the set-cookie header of the response, for example:
response.header('set-cookie', cookies)