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:

Android theme keys:

iOS theme keys:

Identification result

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

DocumentIdentificationResult provide the following properties:

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

Headers

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

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

{
    "success": true
}

Last updated