@bigbangcore/react-native-kyc
v1.0.26
Published
KYC SDK wrapper for _React Native_
Downloads
109
Readme
react-native-kyc
KYC SDK wrapper for React Native
Getting started
$ yarn add @bigbangcore/react-native-kyc @bigbangcore/react-native-linkface
Automatic installation
Using in React Native > 0.60 with Cocoapods the autolinking will handle most to the dependencies
See @bigbangcore/react-native-linkface
project for installing on iOS and Android
Usage
Init KYCVerificator
import KYCVerificator, {KYCVerifyRegion} from '@bigbangcore/react-native-kyc';
const kycVerificator = new KYCVerificator(
0, // Your platform (see backend)
KYCVerifyRegion.China, // Default start with China Region
'http://api.project.com/api', // API url for kyc center
authToken, // Current user Auth token
'<LINKFACE_API_ID>',
'<LINKFACE_API_SECRET>',
);
Listen for KYC info changes to refresh react component UI
const sub = kycVerificator.kycInfoChanges$.subscribe(() => {
// Re-Render when info changes
this.forceUpdate();
});
Scan/Select ID card
- For region China it will use linkface to Scan Chinese ID Card
- For region Worldwide it will show a menu to take or select a picture
kycVerificator
.start(KYCVerifySteps.Front)
.then(() => {})
.catch(error => {
alert(error.message);
});