vCaptcha

node v11.15.0
version: 1.0.0
endpointsharetweet
const redis = require('redis-mock'); const client = redis.createClient(); const vCaptcha = require('vcaptcha')({ client }); const userId = 'userId'; vCaptcha.create({ userId, language: 'en', length: 2 }, (err, captcha, count) => { console.log(captcha.phrase); const guess = [0, 1]; vCaptcha.solve({ userId, unique: captcha.unique, solution: guess }, valid => { console.log(valid ? 'RIGHT ANSWER' : 'WRONG ANSWER'); }); });
Loading…

no comments

    sign in to comment