Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

numio-sdk

khuzama9837ISC1.0.8TypeScript support: included

This package is for using Numio 2Fa service, it's used on the back-end.

readme

NUMIO-SDK

A package for using numio service for authentication purpose. This package is used on back-end, you also need to install numio-cdn on your front-end to complete the process of authentication with numio.

Installation

To install using npm :

npm install numio-sdk
`

To install using Yarn :

yarn add numio-sdk

Getting Started

You have to get yourself registered on numio to start using it's authentication services. After registration you will get "APP_ID" and "APP_SECRET" which you will be using in your code to get started.

Example

import numio from "numio-sdk";

const customRouteToVerifyUser = async (req,res) => {
    try{
        const {token} = req.body;
        const data = {
            token,
            app_secret: "APP_SECRET" //write your APP_SECRET here.
            userDetails: ["fullname", "email", "profileImage", "numio_id] //you're telling that what user information you want in return if user is successfully authenticated.
        }

        const isUserVerfied = await numio.verifyToken(data);
        //you will get response in "isUserVerified" variable, whether user is authenicated successfully or not. 
    }
    catch(e){
        //throw error 
    }
}