numio-sdk
v1.0.8
Published
This package is for using Numio 2Fa service, it's used on the back-end.
Downloads
3
Readme
NUMIO-SDK
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
}
}