# numio-cdn

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

Latest version **1.0.10** (published 2021-07-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install numio-cdn
pnpm add numio-cdn
yarn add numio-cdn
bun add numio-cdn
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2021-07-19 |
| First published | 2020-04-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Shahryar Ahmed , Khuzama Shahid |
| Maintainers | khuzama98, xord.one, devleed |

## Links

- npm: https://www.npmjs.com/package/numio-cdn
- npm.io page: https://npm.io/package/numio-cdn

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.19.2
- [@types/node](https://npm.io/package/@types/node.md) ^13.9.0
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^1.7.0
- [@types/socket.io-client](https://npm.io/package/@types/socket.io-client.md) ^1.4.33

## Recent versions

- 1.0.10 (latest) — 2021-07-19
- 1.0.9 — 2021-05-19
- 1.0.8 — 2021-02-15
- 1.0.7 — 2020-09-15
- 1.0.6 — 2020-08-13
- 1.0.5 — 2020-08-07
- 1.0.4 — 2020-08-07
- 1.0.3 — 2020-06-07
- 1.0.2 — 2020-05-04
- 1.0.1 — 2020-04-28
- 1.0.0 — 2020-04-28

## README

# NUMIO-CDN

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

# Installation

To install using npm :
```
npm install numio-cdn
````

To install using Yarn : 

```
yarn add numio-cdn
```

## Getting Started

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

### Example of Login With Numio

```
import React, {useState, useEffect} from "react;
import numio from "numio-cdn";
import SomeQrComponent from "some-qr-render" //example package for render QR

const MyComponent = () => {
    const [url,setUrl] = useState("");

    useEffect(()=>{
        getUrlFromNumio();
    },[])

    const getUrlFromNumio = async () => {
        try{
            const numioCDN = new numio({app_id: "APP_ID"}); //provide APP_ID you got after registration on numio.
            const res = await numioCDN.getUrlForLogin();
            setUrl(res);
            numioCDN.call(async(token) => {
                console.log(token); //you get token here which you will use to authenticate the user from numio-sdk package
            })
        }
        catch(e){
            console.log(e)
        }
    }

    return(
        <SomeQrComponent
        value={url}
        />
    )
}

```


### Example of KYC With Numio

```
import React, {useState, useEffect} from "react;
import numio from "numio-cdn";
import SomeQrComponent from "some-qr-render" //example package for render QR

const MyComponent = () => {
    const [url,setUrl] = useState("");

    useEffect(()=>{
        getUrlFromNumio();
    },[])

    const getUrlFromNumio = async () => {
        try{
            const numioCDN = new numio({app_id: "APP_ID"}); //provide APP_ID you got after registration on numio.
            const res = await numioCDN.getUrlForKyc();
            setUrl(res);
        }
        catch(e){
            console.log(e)
        }
    }

    return(
        <SomeQrComponent
        value={url}
        />
    )
}

```

---
_Source: https://npm.io/package/numio-cdn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
