React Native SDK
The Dojah platform has a smooth widget that enables your users to authorize access to their accounts. This widget works effortlessly across various browsers and devices of all sizes.
📘 Get Started with React Native SDK - Dojah
webview
-Install react Native webview package
-Usage
-NB: Kindly input your widget_id inside uri above, Get it from your Easy Onboard application dashboard here
Plugin Installation
Confuguration and usage
Reference : https://www.npmjs.com/package/react-native-dojah-sdks
Example Application: https://github.com/dojah-inc/React-native-SDK
At this stage, you can now create a Dojah widget object by passing in your public key in object representing your preferred configuration options.
Parameter | Type | Description |
---|---|---|
type | string | Widget Type : Values are ‘custom’, ‘verification’, ‘identification’, ‘verification’, ‘liveness’ |
app_id | string | Application Id, Get it from your dojah application dashboard here |
p_key | string | Public Key, Get it from your dojah application dashboard here |
reference_id | string | Reference ID, It can be passed to keep track of the verification steps (Started, Ongoing, Successful) |
NB : reference_id character length must be greater than 10 |
| widget_id | string | Widget ID, Get it from your Easy Onboard application dashboard here |
Other required installations (make sure to follow the instructions in the react-native-webview documentation).
N.B.
https://github.com/react-native-webview/react-native-webview/issues/140#issuecomment-574185464
📘 Kindly request camera permissions before launching the widget
Kindly declare and request camera permission in the main activity, at your application level - MainActivity before launching the SDK
Android configuration
iOS Confuguration
The Sample response data after successful verification
📘 How to retrieve the Selfie Photo
There’s a response object that is sent to the client via the widget launcher on success or failure
selfieUrl and idUrl under selfie and id in the success response objects, which holds the final selfie capture and id capture respectively.
See the example folder for an implementation
📘 Webhook Notifications
You can receive the same data below (also passed to onSuccess and onError) via a webhook call.
Register your url for webhook calls here and ensure
kyc.widget
is theservice
you are subscribed to.In Config object Kindly set webhook object value to true (Boolean)
Example : webhook : true
Demo and Setup
https://www.loom.com/share/6aed078b85124a4ba714210271705979
📘 Fix for React-Native android crashing during file/image upload
Permissions: Android android/settings.gradle
Was this page helpful?