1.1.2 • Published 4 years ago

eagle-id v1.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

EYN Eagle Id Component

The EYN Eagle Id component provides convenient access to the EYN's API from applications written in React-based JavaScript.

A demo of eagle-id to verify a person's identity via a (mobile) browser application click here.

Documentation

See the EYN's API docs for more information.

Installation

Install the package with:

npm install eagle-id --save
# or 
yarn add eagle-id`

Usage

import EagleId from 'eagle-id'

<EagleId />

Resources + Demo

Important, for the use of eagle-id you need to copy some resources into your public folder of your React project. These resources comprise images and animations. The required resources can be downloaded here.

Demo

A React demo project using eagle-id can be found here.

Configuration

The package can be initialized with several options as outlined below.

Props

proptypedefaultnotes
configobjectsee default configConfiguration of the component to your needs

The default config is set as follows:

{
  "baseUrl": "https://api.eyn.ninja/api/v1/prod/identitycheck",
  "apiSecret": "public-e692d869-c110-4a33-b003-2098a5e04f72",
  "privacy": {
    "show": true,
    "notice": "https://www.eyn.vision/privacynotice",
  },
  "title": "Eagle ID powered by EYN",
  "ui": {
    "documentTitle": "Select Your Document Type",
    "documentSubTitle": "",
  },
  "camera": {
    "imageFormat": "image/jpeg",
    "ui": {
        "idFront": {
            "scanLabel": "Scan the FRONT SIDE of your document",
            "infoLabel": "Place it within the frame and press the camera button",
            "scanNumber": "Scan 1/2"
        },
        "idBack": {
            "scanLabel": "Scan the BACK SIDE of your document",
            "infoLabel": "Place it within the frame and press the camera button",
            "scanNumber": "Scan 2/2"
        },
        "visa": {
            "scanLabel": "Scan your VISA document",
            "infoLabel": "Place it within the frame and press the camera button",
            "scanNumber": ""
        },
        "passport": {
            "scanLabel": "Scan the FRONT PAGE of your PASSPORT document",
            "infoLabel": "Please make sure to only include the main page containing the passport photo",
            "scanNumber": ""
        },
        "other": {
            "scanLabel": "Scan your document",
            "infoLabel": "Place it within the frame and press the camera button",
            "scanNumber": ""
        },
        "selfie": {
            "scanLabel": "Send us a smile",
            "infoLabel": "Place it within the frame and\n press the camera button",
            "scanNumber": ""
        },
    }
  },
  "resources": {
    "images": {
        "logo": "./resources/images/logo.png",
        "logoTitle": "./resources/images/logo-title.png",
        "privacy": "./resources/images/privacy-notice.png",
        "icon_passport": "./resources/images/type_passport.svg",
        "icon_id": "./resources/images/type_identity_card.svg",
        "icon_other": "./resources/images/identity_type_other.svg",
        "icon_camera": "./resources/images/camera.svg",
        "image_selfie": "./resources/images/selfie_instruc.svg",
        "overlay_document_web": "./resources/images/overlay_document.svg",
        "overlay_document_mobile": "./resources/images/overlay_document_mobile.svg",
        "overlay_selfie_web": "./resources/images/overlay_selfie.svg",
        "overlay_selfie_mobile": "./resources/images/overlay_selfie_mobile.svg",
    },
    "animations": {
        "passport": "./resources/animations/scan_passport.json",
        "idfront": "./resources/animations/scan_document_front.json",
        "idback": "./resources/animations/scan_document_back.json",
        "status_good": "./resources/animations/verify_status_good.json",
        "loading": "./resources/animations/loading_coffee.json",
    }
  }
}
proptypedefaultnotes
baseUrlstringhttps://api.eyn.ninja/api/v1/prod/identitycheckEndpoint URL of EYN's API
apiSecretstringpublic-e692d869-c110-4a33-b003-2098a5e04f72Secret to identify the customer
privacyobject-Privacy settings for the npm component
showBooleantrueSetting to show the privacy notice
noticestringhttps://www.eyn.vision/privacynoticeURL to privacy notice
uiobject-User interface configuration
titlestringEagle ID powered by EYNTitle of component
cameraobject-Camera configuration
imageFormatstringimage/jpegData type of selfie image
resourcesobject-Resource configuration
imagesobject-Image resources
animationsobject-Animation resources

Support

For any developer feedback please contact us at dev@eyn.vision For inquiries or any other feedback please contact us at contact@eyn.vision

Thanks, EYN