0.10.3 • Published 4 years ago

lean-link-web-sdk v0.10.3

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

Link Web SDK

Lean's Link Web SDK is a highly optimized javascript ES6 UMD injectable script, used by developers to let their end users connect their bank accounts throug a series of easy steps in a friendly UI

Getting Started

Using our CDN

Drop the following in your index.html, after the </body> tag

<script src="cdn.leantech.me/link/sdk/web/latest/Lean.min.js"/>

And just call

Lean.link({
    "app_token": "YOUR_APP_TOKEN",
    "app_user_id": "YOUR_APP_USER_ID"
});

This will trigger the Lean Link UI. See more on the docs at docs.leantech.me

NPM Registry

You can also get the latest version from the NPM registry. Simply do

NPM

npm install lean-link-web-sdk

Yarn

yarn add lean-link-web-sdk

Use

You can proceed to import the library using CommonJS

const Lean = require('lean-link-web-sdk');

Or you can import the library as a ES2015 module

import * as Lean from 'lean-link-web-sdk';

...

Lean.link({
    "app_token": "YOUR_APP_TOKEN",
    "app_user_id": "YOUR_APP_USER_ID"
});

Lean.collectMfa({
    "mfa_request_id": "MFA_REQUEST_ID"
});

This will trigger the Lean Link UI. Alternativelly, you can import the only two functions that the library expose in the following way

import { link, collectMfa } from 'lean-link-web-sdk';

...

link({
    "app_token": "YOUR_APP_TOKEN",
    "app_user_id": "YOUR_APP_USER_ID"
});


collectMfa({
    "mfa_request_id": "MFA_REQUEST_ID"
});

See more on the docs at docs.leantech.me