You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ncaptcha-api2

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ncaptcha-api2

Module to integrate captcha for API only apps in nodejs

1.1.3
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Coverage Status npm version

NPM

ncaptcha

Module to integrate captcha for API only apps in nodejs

Dependencies

  • canvas
  • crypto

Usage

const NCaptcha = require('ncaptcha');

//remove {text:'123456'} to get random key and text image.
var ncaptcha = new NCaptcha({text:'123456'});

// send this key and image data to client, client will send key and user inputted test from the image
var data = ncaptcha.generate()

//should return true.
ncaptcha.check(data.key,'123456')

data will have key and image encoded in base64.

Expiry Logic

By default key expires in 10 minutes. You can set 'expireInMinute' in params

// for 20 minutes
new NCaptcha({text:'123456',expireInMinute:20});

Keywords

captcha

FAQs

Package last updated on 01 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts