Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

identif

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

identif

Helper functions to verify one's identity via personal channels(SMS, Phone, E-Mail and more!)

  • 0.4.28
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90%
Maintainers
1
Weekly downloads
 
Created
Source
Identif.js

Identif

A Helper to verify one's identity via personal channels


Identif is an abstract helper class to easily implement the identity verification logic via personal channels like SMS, Phone, E-Mail, and more.

  • It was written for use on CARPLAT which is the platform service for the car rental.

Installation

Greenkeeper badge

# NPM
$ npm install --save identif
# Yarn
$ yarn add identif

Dependencies

  • Redis: if you use RedisStore, the connection to redis server is required.

Usage

const { Identif, RedisStore } = require('identif');

// Create an instance of Identif with RedisStore
const identif = new Identif({
  store: new RedisStore({
    redis: { host: 'my.redis.com', port: 6379 },
    ttl: 3 * 60
  })
});

// Request the verification
const { requestId, code, createdAt } = await identif.request();
/*
Output
{
  requestId: 'e89c3600-6ac7-469e-8d7e-e6e7847b346d',
  code: '1274',
  createdAt: '2017-04-23T14:47:24.173Z'
}
*/

// Respond to the client including `requestId`, `createdAt`
// Send `code` via a personal secure channel like SMS, E-Mail

// Verify the request
const data = await identif.verify(requestId, code);
if (!data) {
  // Failed to verify one's identity
} else {
  // Verifed one's identity
}

API

Identif([options])

Methods
  • request([extra])
  • verify(requestId, code)

MemoryStore()

Methods
  • get(key)
  • set(key, data)

RedisStore([options])

Methods
  • get(key)
  • set(key, data)

Contributing

This project follows the Contributor Covenant Code of Conduct.

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or ask feature requests.

Self Promotion

Like node-identif? Follow the repository on GitHub. And if you're feeling especially charitable, follow posquit0 on GitHub.

Contact

If you have any questions, feel free to join me at #posquit0 on Freenode and ask away. Click here to connect.

License

Provided under the terms of the MIT License.

Copyright © 2017-2018, Byungjin Park.

Keywords

FAQs

Package last updated on 31 Aug 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc