@prosopo/server
v2.10.29
Published
NodeJS package for server side communication with the prosopo captcha client
Downloads
5,942
Readme
@prosopo/server
Server-side package for verifying Prosopo Procaptcha tokens.
Installation
npm install @prosopo/server --saveBasic Usage
import { ProsopoServer } from "@prosopo/server"
import { getServerConfig } from "@prosopo/server"
import { getPair } from "@prosopo/keyring"
const config = getServerConfig()
const pair = getPair(process.env.PROSOPO_SITE_PRIVATE_KEY, config.account.address)
const server = new ProsopoServer(config, pair)
// Verify a Procaptcha token from the client
const result = await server.isVerified(token)
if (result.verified) {
// user passed the captcha
}See the client-example-server for a full working example, and the docs for integration instructions.
