Flutter

Requirements

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

Getting started

Install Authenteq Flow SDK in your project with:
1
flutter pub add authenteq_flow
Copied!
this will change pubspec.yaml and add authenteq_flow dependency, e.g.:
1
dependencies:
2
flutter:
3
sdk: flutter
4
5
authenteq_flow: ^1.70.0
Copied!
Optionally add the modules for Live ID document scanner:
1
flutter pub add authenteq_flow_docscanner
Copied!
and Live ID document scanner database:
1
flutter pub add authenteq_flow_docscanner_db
Copied!
Then install them with the command:
1
flutter pub get
Copied!
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:
1
import 'package:authenteq_flow/authenteq_flow.dart';
2
import 'package:authenteq_flow/models/IdentificationParameters.dart';
3
import 'package:authenteq_flow/models/IdentificationResult.dart';
Copied!
Start identification:
1
IdentificationParameters parameters = new IdentificationParameters();
2
parameters.clientId = '< your client id >';
3
parameters.clientSecret = '< your client secret >';
4
IdentificationResult result = await AuthenteqFlow.identification(parameters);
Copied!
As alternative to client secret authentication it is possible to provide authentication token:
1
parameters.token = '< token >';
Copied!
Token value can be obtained as described in Authentication Token section.
Parameters 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
Background color for all screens (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)

Face Authentication

To perform a face authentication, add the following import:
1
import 'package:authenteq_flow/models/FaceAuthenticationParameters.dart';
Copied!
Start a face authentication:
1
FaceAuthenticationParameters parameters = new FaceAuthenticationParameters();
2
parameters.clientId = '< your client id >';
3
parameters.clientSecret = '< your client secret >';
4
parameters.verficationId = '< verification id to match >';
5
String code = await AuthenteqFlow.faceAuthentication(parameters);
Copied!
As alternative to client secret authentication it is possible to provide authentication token:
1
parameters.token = '< token >';
Copied!
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:
get
https://api.app.authenteq.com
/mobile-sdk/face-authentication-result
Obtain the result of a face authentication
When successful the response will contain a single boolean property named success:
1
{
2
"success": true
3
}
Copied!
Last modified 16d ago