Facedapter IDV Onboarding Flutter SDK

An SDK that provide fast, secured and accurate onboarding data

Example

To run the example project, clone the repo, set YOUR_API_KEY and run the following commands in the Example directory first.

cd example/
flutter run

Demo

Live demo: Contact us for a demo

Features

Security features:

  • Mobile intelligent fraud detection with Shield
  • Face liveness and photo/video presentation attack detections
  • Fast and accurate ID scanning
  • Accurate ID photo and Selfie Matching

Secured and ultra fast:

  • The onboarding SDK is very fast, in lest than 10 seconds it can be completed and it will provide a lot of data for intelligent decision making

A better user experience:

  • Clean and simple UX
  • No waiting, fast detection and onboarding (< 10 seconds)

SDK integration

Installation

FacedapterIDV is available through pub.dev. To install it, Add the facedapter_idv dependency to your pubspec.yaml file:

dependencies:
  ...
  facedapter_idv:

Performing your first onboarding

  1. First you'll need to to get your api key from Facedaper dashboard.

    Initialize the SDK with your api Key in your View Controller:

    class _MyAppState extends State<MyApp> {
        final FacedapterIdvPlugin = FacedapterIdv();
    ...
    

    Initialize the SDK with your api Key in your View Controller:

    await FacedapterIdvPlugin.initialize("YOUR_API_KEY");
    
       
    
    
  2. Perform an Onboarding by calling the method FacedapterIdvPlugin.startOnboarding() and passing it your license key.

Future<void> startOnboarding() async {
    Map<dynamic, dynamic> result = {};
    
    try {
      result = await FacedapterIdvPlugin.startOnboarding() ?? {};
      // result.reasonCode = "MAX_ATTEMPTS"
    } on PlatformException {
      // handle exception
    }
}

Max attempt option

  1. You can limit the number of Onboarding attempts done by a user by providing an optional second parameter to the initialize function.

    Below a value of 2 is used, so when the user reaches 2 unsuccessful Onboarding attempts the Onboarding will end:

    await FacedapterIdvPlugin.initialize("YOUR_API_KEY", 2);
    
       
    
    
  2. When Max attempt is used and onboarding is successful it will return the expect result object, but if it is unsuccessful it will return a reasonCode with value MAX_ATTEMPTS.

Future<void> startOnboarding() async {
    Map<dynamic, dynamic> result = {};
    
    try {
      result = await FacedapterIdvPlugin.startOnboarding() ?? {};
      print(result.reasonCode);
      // the user reached the Max attempts number without a successful Onboarding a reason code is returned.
      // Output is: "MAX_ATTEMPTS"
    } on PlatformException {
      // handle exception
    }
}

Platform specifics

Plugin implementation is in folder lib, while platform specific implementations are in android and ios folders.

Android

Android folder is fully initialized after installation.

iOS

  1. To initialize FacedapterIdv framework for use with iOS, after you've added the dependency to facedapter_idv to your pubspec.yaml, go to NameOfYourProject/iosand run pod install. Our facedapter_idv dependencies will be installed automatically.

  2. Add the required description to your Info.plist for IOS, open NameOfYourProject/ios/Runner.xcworkspace and under NameOfYourProject/ios/Runner/Info.plist set

    • NSCameraUsageDescription
    • NSMicrophoneUsageDescription
    • NSPhotoLibraryAddUsageDescription
    • NSLocationWhenInUseUsageDescription

Onboarding result

All onboarding result are available as a map object.

{
    'userInfo': {
        'firstName': '...',
        'lastName': '...',
        'email': '...',
        'phoneModel': '...',
        'actionDuration': 10, // seconds
        'totalDuration': 20 // seconds
    },
    'location': {
        'latitude': 1.12345678,
        'longitude': 1.12345678,
        'accuracy': 16.399999618530273,
        'altitude': 10.899999618530273
    },
    'address': {
        'country': 'Switzerland',
        'city': 'Geneva',
        'countryCode': 'CH'
    },
    'shield': {
        'device_intelligence': {
            'app_tampering': false,
            'device_score': 115,
            'hooking': false,
            'is_emulated': false,
            'is_jailbroken': false,
            'running_clone_apps': false,
            'running_gps_spoofers': false,
            'running_vpn_spoofers': false,
            'shield_id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            'suspicious_factory_reset': false,
            'virtual_os': false
        },
        'platform': 'Android',
        'session_id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'timestamp': '1646876268',
        'version': '1.1.0'
    },
    'actions': {
        'success': true,
        'images': {
            'image_path',
            'image_path',
            'image_path'
        },
        'actions': {'eyes_close', 'look_up'}
    },
    'blinkId': {
        'fullName': '...',
        'age': '...',
        'address': '...',
        'documentNumber': '...',
        'dateOfExpiry': '...',
        'frontImage': 'image_path',
        'backImage': 'image_path',
        'faceImage': 'image_path'
    },
    'selfieLive': {
        'result': ' live',
        'liveTries': 1,
        'success': true
    } ,
    'selfieCropping': {
        'img': 'image_path',
        'vector': {23.42342, 3.2342, 5.322, ...},
        'success': true
    },
    'idCropping': {
        'img': 'image_path',
        'vector': {23.42342, 3.2342, 5.322, ...},
        'success': true
    },
    'matching':{
        'value': 0.531421528331689,
        'matched': true
    } 
}

Unsuccessful Onboarding result

{
    'message': '.......',
    'reasonCode': 'MAX_ATTEMPTS, // one of  'MAX_ATTEMPTS', 'INTERNAL_ERROR'
}

Author

Facedapter