2.0.2 • Published 3 years ago

@emoji-captcha/server v2.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Emoji Captcha

Next gen captcha generator, which uses emojis to identify humans

emoji captcha demo

Server Installation

Install emoji-captcha with npm

  npm install @emoji-captcha/server

Install emoji-captcha with yarn

  yarn add @emoji-captcha/server

Server Usage/Examples

Generate Emoji

Somewhere in your routes

import { generateEmoji, verifyEmoji } from "@emoji-captcha/server";

const emojiRes = await generateEmoji({
  secret: env.top_secret,
  emojiCount: 5,
  encoding: "svg-xml",
});

//now send emojis to client form

Emoji properties

{
  answer: "cipher containing correct index",
  emojis: [
    "svg 1",
    "svg 2",
    "svg 3",
    "svg 4",
    "svg 5",
  ],
  question: "man bowing"
}

Verifying response

const isCorrect = await verifyEmoji({
  secret: env.top_secret,
  answerHash: "cipher containing correct index",
  selectedIdx: 3, // emoji index which user picked
});
2.0.2

3 years ago

2.0.1

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago