numio-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

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 
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i numio-sdk

Weekly Downloads

1

Version

1.0.8

License

ISC

Unpacked Size

8.17 kB

Total Files

7

Last publish

Collaborators

  • khuzama98
  • xord.one