Onfido logo home page
Watch a demo
Get in touch
Arrow back Back to guides

SDK customization

Start here

The Onfido SDKs have multiple cutomizable features that provide flexibility, while also being easy to integrate. Customizing the Onfido SDKs to match the look and feel of your application can help improve your user experience.

This guide will provide an overview of the customization options available with the Onfido SDKs:

  • flow customization
  • language localization
  • UI customization

For general technical documentation for our SDKs, follow the links on our main Developer Hub page.

Flow customization

Each SDK's flow can be customized by removing, adding or reshuffling certain steps. For example, you could have only document capture for your flow, or have both document and selfie capture.

The information displayed on some screens can also be customized. For example, specifying the document type options for document capture.

Mobile SDK flow

1. Welcome

The welcome screen displays a summary of the capture steps the user will pass through. These steps can be specified to match the flow required.

This is an optional screen in both Android and iOS SDK flows.

intros

2. Document

In the document step, a user can pick the type of document to capture and its issuing country before capturing it with their phone camera.

Document selection and country selection are both optional screens in Android and iOS SDK flows. These screens will only show to the end user if specific options are not configured to the SDK.

You can configure the document step to capture single document types with specific properties:

  • Document type

    • The list of document types visible for the user to select can be filtered using this option
    • Each document type has its own configuration class
    • If only one document type is specified, users will not see the document selection screen or country selection screen and will be taken directly to the capture screen
  • Document country

    • Country configuration allows you to specify the country of origin of the document
    • If a document country is specfied for a document type the country selection screen is not displayed
    • Note: You can specify for all document types except Passport. This is because passports have the same format worldwide so the SDK does not require this additional information. The country selection screen is not displayed for Passport document type
  • Document format

    • The format of a document can be specfied as a plastic card Card or folded document Folded
    • Card is the default document format value for all document types
    • If Folded is configured a specific template overlay is shown to the user during document capture
    • Note: You can specify Folded for French driving licenses, Italian national identity cards and South African national identity cards only. If you configure the SDK with an unsupported country, the SDK will throw an error
ios doc
android doc

3. Face

In the face step, a user can use the front camera to capture either a live photo of their face, or a live video.

The face step can be configured to allow for either a photo or video flow. Note: A custom flow cannot contain both the photo and video variants of the face capture.

  • Photo

By default, an introduction screen will be shown before the start of the photo flow.

The photo flow introduction screen is optional for both the Android and iOS SDK.

ios selfie
android selfie
  • Video

If capturing a live video, the user will be prompted to perform two simple challenges. An introduction screen with a video example will be shown before the start of the video flow.

The video example shown on the introductory step can be removed in both the Android and iOS SDK.

ios vid
android vid

4. Finish

The final screen displays a completion message to the user and signals the end of the flow.

This is an optional screen in the Android SDK only. It is not displayed in the iOS SDK flow.

andr outro

Web SDK flow

1. Welcome

The welcome screen displays a summary of the capture steps the user will pass through. These steps can be specified to match the flow required.

This is an optional screen.

The custom string options are:

  • title
  • descriptions
  • nextButton
web welcome

2. Document

In the document step, a user can pick the document type and its issuing country before providing images of their selected document.

Document selection and country selection are both optional screens. These screens will only show to the end user if specific options are not configured to the SDK.

The custom options are:

  • Document type

    • documentTypes
    • The list of document types visible to the user to select can be filtered by using this option
    • If documentTypes only includes one document type, users will not see the document selection screen or country selection screen and will be taken directly to the capture screen
  • Document country

    • Document country can be specified per document type
    • If a document country is specified for a document type the country selection screen is not displayed
    • Note: You can specify for all document types except Passport. This is because passports have the same format worldwide so the SDK does not require this additional information. The country selection screen is not displayed for Passport document type
web doc1
  • Cross device flow

The Web SDK offers a cross device flow where desktop users will be given the option to continue using their desktop browser or swap to using their mobile device browser to complete the capture process. If a user selects to use their mobile device they will be redirected via a secure link that they can receive by SMS or QR code to complete the flow. At the end of the capture process users will be redirected back to their desktop to complete the SDK flow.

  • When configured, forceCrossDevice makes the cross device flow mandatory for all users who will be required to complete the capture process on a mobile device browser
  • Configuring this option minimises the risk of fraudulent upload by ensuring a higher likelihood of live capture
web crossdevice
  • Live document capture

    • useLiveDocumentCapture
    • Note: This BETA feature is only available on mobile devices
    • Configuring this option minimises the risk of fraudulent upload by bypassing the device's default camera application. Instead, mobile browser users will be able to capture document images using an optimized camera UI, where the SDK directly controls the camera feed to ensure live capture
  • Upload Fallback (This option only applies when useLiveDocumentCapture is True)

    • uploadFallback
    • When live document capture is not possible, upload fallback allows users to upload image files via their device's default camera application
    • Note: When the mobile device does not have a camera or lacks camera browser support, the user will not be able to complete the flow if this option is not configured
web doc2

3. Face

In the face step, users will be asked to capture their face in the form of a photo or video. They will also have a chance to check the quality of the photos or video before confirming.

The custom options are:

  • Specify variant

    • requestedVariant
    • This includes photo or video options, withย photo being the default
    • If a video cannot be taken, the face step will fallback to the standard photo option
  • Upload Fallback

    • uploadFallback
    • When live photo or live video capture is not possible, upload fallback allows users to upload image files via their device's default camera application
    • Note: When the mobile device does not have a camera or lacks camera browser support, the user will not be able to complete the flow if this option is not configured
web vid
web selfie

4. Finish

The final screen displays a completion message to signal the next steps to the user.

This is an optional screen.

The custom string options are:

  • message
  • submessge
web outro

Language customization

The Onfido SDKs allow for language customization across all platforms.

Supported languages

Onfido supports and maintains translations for 4 languages that can be implemented directly inside the SDK.

All of these languages are supported across Web, Android and iOS under the following locales:

Language Android iOS Web
English (en) ๐Ÿ‡บ๐Ÿ‡ธ โœ” โœ” โœ”
French (fr) ๐Ÿ‡ซ๐Ÿ‡ท โœ” โœ” โœ”
German (de) ๐Ÿ‡ฉ๐Ÿ‡ช โœ” โœ” โœ”
Spanish (es) ๐Ÿ‡ช๐Ÿ‡ธ โœ” โœ” โœ”

Note: English is the default language.

ios localisation

Custom language

The Onfido SDKs also allow for the selection of a specific custom language for locales that Onfido does not currently support.

You need to provide custom translations and the relevant locale tag. Note: If a locale is not specfied the language is inferred from the device settings.

Further information can be found in our SDK reference pages for iOS, Android and Web.

UI customization

The Onfido mobile SDKs have additional UI options which allow you to customize the look and feel of the SDKs to match your application. This helps create a more seamless experience for your users.

iOS

The iOS SDK supports the customization of colors, fonts and strings used in the SDK flow.

iOS UI customization

  • primaryColor: Defines the icon background color, button color and back navigation button color
  • primaryTitleColor: Defines the primary button text color
  • primaryBackgroundPressedColor: Defines the primary button pressed state color
  • secondaryBackgroundPressedColor: Defines the secondary button pressed state color
  • fontRegular: Defines the font name for the regular/body custom font
  • fontBold: Defines the font name for the bold/title custom font

Dark mode

The iOS SDK also supports Dark Mode as a custom option.

supportDarkMode: Defines if iOS Dark Mode will be enabled on SDK screens

Note: The value is true by default. Note: This property is applicable only for Xcode 11 and above built apps and devices running on iOS 13 and above.

Android

The Android SDK supports the customization of colors and strings used in the SDK flow.

Android UI customization

Colors are defined in a colors.xml file:

  • onfidoColorPrimary: Defines the background color of the Toolbar which guides the user through the flow
  • onfidoColorPrimaryDark: Defines the color of the status bar above the Toolbar
  • onfidoTextColorPrimary: Defines the title font colour on the Toolbar
  • onfidoTextColorSecondary: Defines the subtitle font colour on the Toolbar
  • onfidoPrimaryButtonColor: Defines the button color, icon background color and the text color on the secondary action buttons
  • onfidoPrimaryButtonColorPressed: Defines the primary button pressed state color
  • onfidoPrimaryButtonTextColor: Defines the primary button text color

Web

UI customization on the Web SDK is currently only via CSS.

Onfido

Our Solutions

Onfido uses 256-bit SSL encryption 100% of the time on every device.

BSI ISO/IEC27001

Onfido has been certified by BSI to ISO 27001 under certificate number IS 660122.

ยฉ Onfidoโ„ข, 2020. All rights reserved.
Company Registration Number: 07479524.