React Native SDK for Canopy Connect
npm install @canopyconnect/react-native-sdk cd react-native-app
npm install @canopyconnect/react-native-sdk
import CanopyConnect from '@canopyconnect/react-native-sdk';
publicAlias={'demo'}
onAuthenticationSuccess={(data) => {
// Close here if you want to exit after authentication
// this.setState({ isOpen: false });
// use data to setup listening for webhook
}}
onExit={(err, data) => {
this.setState({ isOpen: false });
if (err) {
// reprompt to submit data if err exists
} else {
// use data to setup listening for webhook
}
}}
pullMetaData={{
custom-data-id: '123-456'
}}
consentToken={'xxx'}
/>
boolean | Controls wether the modal is shown |string | Specifies what link is used |function | Called when authentication is complete and user action is no longer required |function | Called when the user leaves mid flow or when flow is completed and 'Finish' is clicked on the last page |function | If enabled on the link, allows you to listen for when an unsupported carrier is selected |object | JSON serializable data that is saved onto the pull |string | Used to skip consent screen by collecting consent with your own view |boolean | Force modal to take up the entire screen |boolean | If SafeAreaView should be used |function | Returns component displayed while webview loads |object | Style for overlay |object | Style for backdrop |