Skip to main content

authentity_sdk 0.1.0 copy "authentity_sdk: ^0.1.0" to clipboard
authentity_sdk: ^0.1.0 copied to clipboard

Authentity SDK — embeddable NFC passport / ID (eMRTD) reading for Flutter. Authenticate with an Authentity API key and read documents via the drop-in flow or the headless relay session.

authentity_sdk (Flutter) #

Embeddable NFC passport / ID (eMRTD) reading for Flutter apps, powered by the Authentity platform. The SDK captures the MRZ with the camera, relays the chip read through the Authentity server, and returns the document data — MRZ fields, face photo (DG2) and signature (DG7).

The reader requires the Authentity server. All BAC/PACE cryptography and data-group parsing happen server-side; the SDK is a thin, secure relay. See ../../PROTOCOL.md.

Install #

Distributed privately via git:

dependencies:
  authentity_sdk:
    git:
      url: https://github.com/TheOWler/authentity.io.git
      path: packages/flutter
      ref: v0.1.0

Get an API key #

Sign in to the Authentity dashboard → API Keys → create a key. Copy the authty_... value (shown once) and pass it to the SDK.

Usage — drop-in flow #

import 'package:authentity_sdk/authentity_sdk.dart';

Authentity.initialize(apiKey: 'authty_...');

final result = await Authentity.scanDocument(context);
if (result != null) {
  print(result.documentNumber);
  print(result.nationality);
  // result.photo?.bytes, result.signature?.bytes, result.availableDGs
}

Usage — headless (bring your own UI) #

final session = AuthentityRelaySession(
  config: AuthentityConfig(apiKey: 'authty_...'),
);
session.onProgress = (p) => print('${p.step} ${(p.fraction * 100).round()}%');

try {
  final result = await session.scan(
    documentNumber: 'L898902C3',
    dateOfBirth: '740812',   // yyMMdd
    dateOfExpiry: '120415',  // yyMMdd
  );
} on AuthentityException catch (e) {
  print('${e.code}: ${e.message}');
}

Platform setup #

Android (AndroidManifest.xml): NFC and CAMERA permissions; the app must handle NFC intents. Min SDK 21+.

iOS (Info.plist / entitlements): NFCReaderUsageDescription, NSCameraUsageDescription, the com.apple.developer.nfc.readersession.iso7816.select-identifiers entitlement with the eMRTD AID A0000002471001, and a provisioning profile with the NFC capability enabled.

Errors #

AuthentityException.code is one of: invalidApiKey, permissionDenied, quotaExceeded, nfcNotAvailable, nfcTagLost, chipReadFailed, userCancelled, network, unknown.

0
likes
120
points
88
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Authentity SDK — embeddable NFC passport / ID (eMRTD) reading for Flutter. Authenticate with an Authentity API key and read documents via the drop-in flow or the headless relay session.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

camera, camera_platform_interface, convert, flutter, flutter_nfc_kit, google_mlkit_commons, google_mlkit_text_recognition, intl, logging, permission_handler, socket_io_client

More

Packages that depend on authentity_sdk