# verify-once

> VerifyOnce integration library and example

Latest version **1.29.0** (published 2021-10-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install verify-once
pnpm add verify-once
yarn add verify-once
bun add verify-once
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.29.0 |
| Published | 2021-10-18 |
| First published | 2018-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 105.9 KB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | VisionCraft |
| Maintainers | timmu, stenmlvc |

## Links

- npm: https://www.npmjs.com/package/verify-once
- Repository: https://github.com/visioncrafters/verify-once
- Homepage: https://github.com/visioncrafters/verify-once#readme
- Issues: https://github.com/visioncrafters/verify-once/issues
- npm.io page: https://npm.io/package/verify-once

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.21.2
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1

## Recent versions

- 1.29.0 (latest) — 2021-10-18
- 1.28.0-beta.0 (beta) — 2021-06-30
- 1.28.2 — 2021-10-14
- 1.28.1 — 2021-10-11
- 1.28.0 — 2021-09-01
- 1.27.0 — 2021-05-27
- 1.27.0-beta.1 — 2021-05-26
- 1.27.0-beta.0 — 2021-05-18
- 1.26.0 — 2021-02-26
- 1.25.0 — 2021-02-18
- 1.24.1 — 2021-01-06
- 1.24.0 — 2020-10-05
- 1.24.0-beta.2 — 2020-08-27
- 1.24.0-beta.1 — 2020-08-14
- 1.24.0-beta.0 — 2020-08-05
- … 12 more at https://npm.io/package/verify-once/versions

## README

# VerifyOnce

[![Downloads](https://img.shields.io/npm/dm/verify-once.svg)](http://npm-stat.com/charts.html?package=verify-once)

[![Version](https://img.shields.io/npm/v/verify-once.svg)](http://npm.im/verify-once)

[![License](https://img.shields.io/npm/l/verify-once.svg)](http://opensource.org/licenses/MIT)

**VerifyOnce verification service integration library and example.**

Provides helpers for simple VerifyOnce service integration and example how to use it.

- Works with express server.
- Written in TypeScript, no need for extra typings.

## Installation

This package is distributed via npm

```cmd
npm install verify-once
```

```cmd
yarn add verify-once
```

## Usage

Credentials should be stored in projects config file.
BaseUrl is optional param, for testing use dev or test prefix, defaults to https://app.verifyonce.com/api/verify

```JSON
...

"verifyOnce": {
   "password": "integratorPassword",
   "username": "integratorUserName",
   "baseUrl":  "https://test-app.verifyonce.com/api/verify"
  },

...
```

Initiating Verify Once transaction

```TSX
import { VerifyOnce } from "verify-once";

...

// all optional, are used for autofill
const userData : InitiateRequest = {
	country: CountryCode.BLR,
	firstName: "John",
	lastName: "Wick",
	email: "john@wick.com",
}

// initiate verification
const verifyOnce = new VerifyOnce(config.verifyOnce);

// passing userData object is optional
const verifyOnceInitiateResponse : InitiateResponse = await verifyOnce.initiate(userData);

...
```

## Example

The example is located in the `/example` directory.

Running the example

- Copy the example configuration file `_.env` to `.env`.
- Make changes in the `.env` as needed.
- Start the example by executing `yarn start` (`npm start` etc works as well).

## Commands

- `yarn start` to start the example application.
- `yarn build` to build the production version.
- `yarn lint` to lint the codebase.
- `yarn prettier` to run prettier.

```

```

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