# enface-auth-node-enfaceid

> Enface Pay +ID biometric authorization library for Node.js environment

Latest version **1.0.0** (published 2019-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install enface-auth-node-enfaceid
pnpm add enface-auth-node-enfaceid
yarn add enface-auth-node-enfaceid
bun add enface-auth-node-enfaceid
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-12-16 |
| First published | 2019-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 31.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Enface LTD |
| Maintainers | enface |
| Keywords | enface, authorization, blockchain, sdk |

## Links

- npm: https://www.npmjs.com/package/enface-auth-node-enfaceid
- Repository: https://github.com/safead/enface-auth-node-enfaceid
- Homepage: https://enface.io
- Issues: https://github.com/safead/enface-auth-node-enfaceid/issues
- npm.io page: https://npm.io/package/enface-auth-node-enfaceid

## Dependencies (4)

- [ws](https://npm.io/package/ws.md) ^7.2.1
- [uuid](https://npm.io/package/uuid.md) ^3.3.3
- [bufferutil](https://npm.io/package/bufferutil.md) ^4.0.1
- [utf-8-validate](https://npm.io/package/utf-8-validate.md) ^5.0.2

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-12-16

## README

# Enface Pay +ID authorization Node.js library

Enface offers secure, blockchain based authorization feature for any websites (or apps) using [Enface Pay +ID application](https://apps.apple.com/us/app/enface-pay-id/id1480029680 "Enface Pay +ID"). Our authentication process is based on strong cryptographic algorithms and are military safe.

To enable our solution you should pass the following steps:

- Register for free at [Enface website](https://admin.enface.io "Enface website"), visit �[Biometric authorization](https://admin.enface.io/authorization "Biometric authorization")�page  and click on the �Add new project� button. **Setup �API key for authentication�** from the drop-down of the project panel. **Copy the �Project id� and �Secret key� variables for future usage.**
- Integrate the [frontend widget](https://github.com/safead/enface-auth-widget "frontend widget") on your website or application.
- Setup backend environment, using instructions below.

This package is for backend integration with Node.js environment. You should provide any existing Express instance to enable EnfaceAuth.

## Installation

### npm

```bash
npm i --save enface-auth-node-enfaceid
```

### yarn

```bash
yarn add enface-auth-node-enfaceid
```

## Usage

ES2015 module import:
```js
import { EnfaceAuth } from "enface-auth-node-enfaceid";
```
CommonJS module require:
```js
const { EnfaceAuth } = require("enface-auth-node-enfaceid");
```

### Initialization:
```js
new EnfaceAuth({

  httpServer: <object>,
  callbackUrl: <string>,
  projectId: <string>,
  secretCode: <string>,
  fields: <string>,
  debug: <boolean>, // debug logs

});
 ```
### EnfaceAuth parameters:

`httpServer (Express instance)`

EnfaceAuth module will start in HTTP/S mode and will use default Express port to listen all the connections. In this mode both [frontend widget](https://github.com/safead/enface-auth-widget "frontend widget") and Enface API server should be able connect to http(s)://yourdomain.com to process required operations.

`callbackUrl: <string>`

http(s) URL to connect to this backend module.

`projectId: <string>`

�Project id� variable from the [Enface website](https://admin.enface.io "Enface website") project description.

`secretCode: <string>`

�Secret key� variable from the [Enface website](https://admin.enface.io "Enface website") project description.

`fields: <string>`

The data fields, you want to request from a user during authorization process (separated by commas). The available values are: 'full_name', 'email', 'phone_mobile'. For example, to request full information about the user, 'fields' variable should be set to 'full_name,email,phone_mobile'. You can ommit the 'fileds' variable, and will receive only user login in Enface ID platform.

### Here is how EnfaceAuth is integrated at our own Node.js server.

```js
new EnfaceAuth({

  httpServer: app, // app is the existing Express instance
  projectId: process.env.AUTH_PRODUCT_ID,
  secretCode: process.env.BIO_AUTH_SECRET,
  callbackUrl: 'https://enface-api-server.herokuapp.com',

});
```

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