Guide
Introduction
eideasy-browser-client is a handy tool that you can use to handle the client side parts of the identification and signing flows when using eID Easy API.
A typical signing implementation using the eID Easy API and the eideasy-browser-client would look like this:
- Prepare the files for signing by sending a server side request to the /prepare-files-for-signing endpoint.
- /prepare-files-for-signing endpoint returns a docId.
- Create a browser client instance using the docId.
- Use any of the eideasy-browser-client's signing modules (e.g. idCardSignature, smartIdSignature, mobileIdSignature etc.) to complete the signing process.
- eID Easy server sends a POST request containing doc_id and signer_id to your configured "Signature notification URL" when the user has finished signing the document.
Installation
NOTE
We are constantly improving our browser-client and releasing new versions. Make sure to use the latest version of the browser-client to get access to the latest signing and authentication methods.
NPM
- Install with npm or Yarn:
yarn add @eid-easy/eideasy-browser-client
npm install @eid-easy/eideasy-browser-client
- Import createClient:
import createClient from '@eid-easy/eideasy-browser-client';
CDN
- Add the script tag:
<script src="https://cdn.jsdelivr.net/npm/@eid-easy/eideasy-browser-client@2.108.0/dist/eideasy-browser-client.js" integrity="sha256-lYJ4ohjo+TGixRlpJtAHlXi7DTB+wO84Ati8v81EkSU=" crossorigin="anonymous"></script>
- Use the eidEasyBrowserClient object to access createClient:
const createClient = window.eidEasyBrowserClient.createClient;