Onfido LogoOnfido Logo

Developers

Customers integrating using Onfido Studio can authenticate the SDK using tokens generated and exposed in the workflow run payload returned by the API when a workflow run is created.

Customers integration without the use of Onfido Studio must authenticate the SDK by manually generating an SDK token using 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 for captureFace, then you should be aware that this configuration is no longer available, so you can safely remove it from your integration code.

Before 12.0.0:

bash
1config = {
2 sdkToken: “EXAMPLE-TOKEN-123”,
3 flowSteps: {
4 welcome: true,
5 ...
6 captureFace: {
7 type: OnfidoCaptureType.MOTION,
8 motionCaptureFallback: {
9 type: OnfidoCaptureType.PHOTO
10 },
11 },
12 },
13}

After 12.0.0:

bash
1config = {
2 sdkToken: “EXAMPLE-TOKEN-123”,
3 flowSteps: {
4 welcome: true,
5 ...
6 captureFace: {
7 type: OnfidoCaptureType.MOTION
8 },
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 configuring bubbleErrorBackgroundColor as part of your colors.json file, you can now safely remove it.

  • The flag supportDarkMode on the appearance configuration has been removed. Use userInterfaceStyle instead to configure the same behaviour.

Before 12.0.0:

bash
1{
2 "onfidoPrimaryColor": "#FF0000",
3 "backgroundColor": {
4 "light": "#FCFCFD",
5 "dark": "#000000"
6 },
7 "supportDarkMode": true,
8 ...
9}

After 12.0.0:

bash
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:

bash
1config = {
2 sdkToken: “EXAMPLE-TOKEN-123”,
3 flowSteps: {
4 welcome: true,
5 ...
6 captureFace: {
7 type: OnfidoCaptureType.MOTION,
8 options: VIDEO_CAPTURE_FALLBACK
9 },
10 },
11}

After 9.0.0:

bash
1config = {
2 sdkToken: “EXAMPLE-TOKEN-123”,
3 flowSteps: {
4 welcome: true,
5 ...
6 captureFace: {
7 type: OnfidoCaptureType.MOTION,
8 motionCaptureFallback: {
9 type: OnfidoCaptureType.PHOTO
10 },
11 },
12 },
13}
  • In fact, options key was entirely removed from captureFace. captureFace can be one of the 3 following types:
bash
1type OnfidoFaceSelfieCapture = {
2 type: OnfidoCaptureType.PHOTO;
3 showIntro?: boolean
4};
5
6type OnfidoFaceVideoCapture = {
7 type: OnfidoCaptureType.VIDEO;
8 showIntro?: boolean;
9 showConfirmation?: boolean;
10 manualVideoCapture?: boolean;
11};
12
13type 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.