Customers integrating using Onfido Studio can authenticate the SDK using tokens generated and exposed in theworkflow run payloadreturned by the API when a workflow run iscreated.
Customers integration without the use of Onfido Studio must authenticate the SDK by manuallygenerating an SDK tokenusing the Onfido API.
Onfido SDK Migration Guides## Onfido React Native SDK 12.0.0 Migration Guide
Breaking API Changes
- Motion is now supported on all devices. Motion capture fallback configuration has therefore been removed.
- If you currently set a
motionCaptureFallback
forcaptureFace
, then you should be aware that this configuration is no longer available, so you can safely remove it from your integration code.
- If you currently set a
Before 12.0.0:
1config = {2 sdkToken: “EXAMPLE-TOKEN-123”,3 flowSteps: {4 welcome: true,5 ...6 captureFace: {7 type: OnfidoCaptureType.MOTION,8 motionCaptureFallback: {9 type: OnfidoCaptureType.PHOTO10 },11 },12 },13}
After 12.0.0:
1config = {2 sdkToken: “EXAMPLE-TOKEN-123”,3 flowSteps: {4 welcome: true,5 ...6 captureFace: {7 type: OnfidoCaptureType.MOTION8 },9 },10}
-
The option to set the
bubbleErrorBackgroundColor
as part of the appearance configuration has been removed, as this configuration option is not longer available. If you are currently configuringbubbleErrorBackgroundColor
as part of yourcolors.json
file, you can now safely remove it. -
The flag
supportDarkMode
on the appearance configuration has been removed. UseuserInterfaceStyle
instead to configure the same behaviour.
Before 12.0.0:
1{2 "onfidoPrimaryColor": "#FF0000",3 "backgroundColor": {4 "light": "#FCFCFD",5 "dark": "#000000"6 },7 "supportDarkMode": true,8 ...9}
After 12.0.0:
1{2 "onfidoPrimaryColor": "#FF0000",3 "backgroundColor": {4 "light": "#FCFCFD",5 "dark": "#000000"6 },7 "userInterfaceStyle": "dark",8 ...9}
Onfido React Native SDK 9.0.0 Migration Guide
Breaking API Changes
- Extra customization was introduced to the Capture Face step (for more information, see our readme file). A breaking change was introduced when defining the fallbacks for a Motion type face capture, you can see from the example below how to update.
Before 9.0.0:
1config = {2 sdkToken: “EXAMPLE-TOKEN-123”,3 flowSteps: {4 welcome: true,5 ...6 captureFace: {7 type: OnfidoCaptureType.MOTION,8 options: VIDEO_CAPTURE_FALLBACK9 },10 },11}
After 9.0.0:
1config = {2 sdkToken: “EXAMPLE-TOKEN-123”,3 flowSteps: {4 welcome: true,5 ...6 captureFace: {7 type: OnfidoCaptureType.MOTION,8 motionCaptureFallback: {9 type: OnfidoCaptureType.PHOTO10 },11 },12 },13}
- In fact,
options
key was entirely removed fromcaptureFace
.captureFace
can be one of the 3 following types:
1type OnfidoFaceSelfieCapture = {2 type: OnfidoCaptureType.PHOTO;3 showIntro?: boolean4};56type OnfidoFaceVideoCapture = {7 type: OnfidoCaptureType.VIDEO;8 showIntro?: boolean;9 showConfirmation?: boolean;10 manualVideoCapture?: boolean;11};1213type OnfidoFaceMotionCapture = {14 type: OnfidoCaptureType.MOTION;15 recordAudio?: boolean;16 motionCaptureFallback?: OnfidoFaceSelfieCapture | OnfidoFaceVideoCapture;17};
- Near Field Communication (NFC) is now enabled by default and offered to customers when both the document and the device support NFC. To disable NFC, please refer to our NFC reference guide.