Flutter

Requirements

Installation of the Authenteq Flow plugin requires Flutter v2.5.0.

Getting started

Install Authenteq Flow SDK in your project with:

flutter pub add authenteq_flow

this will change pubspec.yaml and add authenteq_flow dependency, e.g.:

dependencies:
  flutter:
    sdk: flutter

  authenteq_flow: ^1.70.0

Optionally add the modules for Live ID document scanner:

flutter pub add authenteq_flow_docscanner

and Live ID document scanner database:

flutter pub add authenteq_flow_docscanner_db

Then install them with the command:

flutter pub get

for more information see Flutter official documentation here.

For iOS setup check here. For Android setup check here.

Example to Start an Identification

Import AuthenteqFlow plugin in your dart file:

import 'package:authenteq_flow/authenteq_flow.dart';
import 'package:authenteq_flow/models/IdentificationParameters.dart';
import 'package:authenteq_flow/models/IdentificationResult.dart';

Start identification:

IdentificationParameters parameters = new IdentificationParameters();
parameters.clientId = '< your client id >';
parameters.clientSecret = '< your client secret >';
IdentificationResult result = await AuthenteqFlow.identification(parameters);

As alternative to client secret authentication it is possible to provide authentication token:

parameters.token = '< token >';

Token value can be obtained as described in Authentication Token section.

Parameter fields description:

Key name

Type

Description

clientId

String

Client ID value from Customer Dashboard (required)

clientSecret

String

Client Secret value from Customer Daskboard (required unless token is specified)

flowId

String

In conjunction with Client Secret, Flow ID specify a verification flow defined in customer's dashboard (optional)

token

String

Authentication token (required unless clientSecret is specified)

theme

Dictionary

Customized theme settings (optional)

Android theme keys:

Key name

Type

Description

AndroidStyle

String

Android style name (for definition details see Android customization)

iOS theme keys:

Key name

Type

Description

primaryColor

String (hex value)

Main color of your scheme

textColor

String (hex value)

Text color

screenBackgroundColor

String (hex value)

Background color for all screens

viewBackgroundHighlightColor

String (hex value)

Color for some highlighted area in screen background

separatorColor

String (hex value)

Color for table view cells separator

selectedButtonTextColor

String (hex value)

Color for selected buttons text

selectedButtonBackgroundColor

String (hex value)

Background color for selected buttons

font

String

Font name for text

boldFont

String

Font name for bold text

identificationInstructionImageForSelfie

Image

Custom image for liveness instructions. We recommend using images smaller than 300dp

identificationInstructionImageForPassport

Image

Custom image for passport scan instructions. We recommend using images smaller than 300dp

identificationInstructionImageForDriverLicense

Image

Custom image for driver's license scan instructions. We recommend using images smaller than 300dp

identificationInstructionImageForIdCard

Image

Custom image for ID card scan instructions. We recommend using images smaller than 300dp

identificationNfcSymbolCheck

Image

Custom image NFC chip presence verification instructions in the document

identificationNfcInstruction

Image

Custom image NFC document scan instructions

identificationNfcScanInside

Image

Custom image for NFC document inside scan instructions

identificationInstructionImageForProofOfAddress

Image

Custom image for proof of address scan instructions. We recommend using images smaller than 300dp

identificationIconForIdDocument

Image

Custom icon for ID document. We recommend using images smaller than 250dp

identificationIconForProofOfAddress

Image

Custom icon for proof of address. We recommend using images smaller than 250dp

Identification result

The class IdentificationResult will be returned after a successful identification with the following properties:

Property

Type

Description

verificationId

String

Unique reference ID of the completed identification

documents

List<DocumentIdentificationResult>

Array with details of the identification documents

selfieImageFilePath

String

File path to selfie image

proofOfAddressFilePath

String

File path to proof of address document

DocumentIdentificationResult provide the following properties:

Property

Type

Description

documentType

enum

Id document type. Possible values:

  • PASSPORT - passport

  • NATIONAL_ID - national ID card

  • DRIVERS_LICENSE - driver's license

givenNames

String

Given names (separated with whitespace)

givenNamesLocalized

String

Given names in the local language (optional)

surname

String

Surnames (separated with whitespace)

surnameLocalized

String

Surnames in the local language (optional)

surnameAndGivenNames

String

Surnames and Given Name(s) (separated with whitespace) - For use when givenNames and surname are not available as separate fields

surnameAndGivenNamesLocalized

String

Surnames and Given Name(s) in the local language (optional)

placeOfBirth

String

Place of birth

placeOfBirthLocalized

String

Place of birth in the local language (optional)

dateOfBirth

DateTime

Date of birth

dateOfExpiry

DateTime

Date of expiration of the document

dateOfIssue

DateTime

Date of issue of the document

nationality

String

Country code of user's nationality in ISO 3166-1 alpha-3 format

issuingCountry

String

Country code of document's issuing country in ISO 3166-1 alpha-3 format

issuingAuthority

String

Issuing authority name

issuingAuthorityLocalized

String

Issuing authority name in the local language (optional)

documentNumber

String

ID document number

personalNumber

String

Personal number of the document owner

sex

String

Possible values are:

  • M (male)

  • F (female)

  • X (unspecified)

address

String

Place of residence

jurisdiction

String

Area where the document got issued. E.g.: USA State or Canada Province.

licenseClass

String

Driver's License Classes

licenseClassDetails

Map<String,DriversLicenseClassDetailResult>

Driver's License Class details. Map Key is the Class name (i.e. A, B, B1, C, etc.) and Value is a DriversLicenseClassDetailResult class containing the following properties:

  • from [DateTime] Validity start date

  • to [DateTime] Validity end date

  • notes [String] Additional notes

isSixteenPlus

bool

Is person's age over 16 years.

isEighteenPlus

bool

Is person's age over 18 years.

isTwentyOnePlus

bool

Is person's age over 21 years.

documentFrontImageFilePath

String

File path to the image of ID document front page

documentBackImageFilePath

String

File path to the image of ID document back page

Face Authentication

To perform a face authentication, add the following import:

import 'package:authenteq_flow/models/FaceAuthenticationParameters.dart';

Start a face authentication:

FaceAuthenticationParameters parameters = new FaceAuthenticationParameters();
parameters.clientId = '< your client id >';
parameters.clientSecret = '< your client secret >';
parameters.verficationId = '< verification id to match >';
String code = await AuthenteqFlow.faceAuthentication(parameters);

As alternative to client secret authentication it is possible to provide authentication token:

parameters.token = '< token >';

Token value can be obtained as described in Authentication Token section.

We suggest to use the token authentication in production environment.

With the code obtained it is possible to get the face authentication result using the following API:

Obtain the result of a face authentication

GET https://api.app.authenteq.com/mobile-sdk/face-authentication-result

This endpoint is authorized with Basic Authorization. You should use your Client ID and Client Secret from the Customer Dashboard as the credentials.

Query Parameters

NameTypeDescription

code*

string

The code provided at the conclusion of SDK face authentication

Headers

NameTypeDescription

Authorization*

string

Your client credentials combined with a colon separator, base64-encoded and prefixed with "Basic ".

{
  "accessToken": "81e4cbce-cdad-11eb-8fc3-784f4385af2b"
}

When successful the response will contain a single boolean property named success:

{
    "success": true
}

Last updated