@woflowinc/link
v1.0.12
Published
Woflow Link
Downloads
1,649
Readme
@woflowinc/link
Install
npm i @woflowinc/link
Getting started
Make sure you have your JWT token and public key
Embed woflow link
Use the following code to embed your Portal into your app:
import { WoflowLink } from '@woflowinc/link';
const options = {
jwt: token,
publicKey: publicKey,
linkConfigurationId: linkConfigurationId,
theme: {
width: 400, // 400 (default), 600, 800
overlay: 'light', // defaults to 'dark'
},
};
// To initialize pass JWT token and public key - authenticate platform
const woflow = new WoflowLink(options);
// use this wherever you need to trigger an import
woflow.openIframe({
onData: (data) => {
console.log(`Data returned from Woflow`);
console.log({ data });
},
onClose: () => {
console.log('Woflow SDK has been closed');
},
});