@truv/bridge
v2.1.0
Published
Truv Bridge initialization package
Downloads
3,014
Readme
Truv Bridge
Library for integrating with the Truv Bridge
Install
With npm
:
npm install @truv/bridge --save
With yarn
yarn add -S @truv/bridge
Usage
import TruvBridge from '@truv/bridge'
const bridge = TruvBridge.init({
bridgeToken: '<previously generated bridge token>', // more info https://docs.truv.com/reference/bridge-tokens_create
onSuccess: (publicToken, metaData) => {
console.log(publicToken, metaData);
},
});
// when the widget needs to be opened
bridge.open();