Authmatech Flutter SDK

A professional cellular-data-based identity verification plugin for Flutter, enabling mobile network operator (MNO) detection over a cellular connection on both Android and iOS.


Overview

Authmatech Flutter SDK lets you perform seamless identity verification by forcing your appโ€™s HTTP requests over the deviceโ€™s cellular data network. Under the hood, it leverages native Android and iOS SDKs to request an encrypted Authmatech code from your backend.


Features

  • ๐Ÿš€ Cross-platform: single Dart API for Android & iOS
  • ๐Ÿ“ก Force cellular data: bypass Wi-Fi or other interfaces
  • ๐Ÿ”’ Encrypted MNO detection: fetch Authmatech Code via your operator
  • โš™๏ธ Rich debugging: optional trace logs and device info
  • ๐Ÿ”„ Automatic retries & redirects (up to 10)
  • ๐Ÿ“ฑ Min SDK: Android 8.0+ / iOS 12.0+

Installation

Add the SDK to your Flutter app:

flutter pub add authmatech_sdk_flutter

Or in your pubspec.yaml:

dependencies:
  authmatech_sdk_flutter: ^1.0.0

Then run:

flutter pub get

Usage

1. Import the plugin

import 'package:authmatech_sdk_flutter/authmatech_sdk_flutter.dart';

2. Initialize (optional)

If you need global debug tracing, call once:

await AuthmatechSdkFlutter.initialize(
  debug: true,                 // enable trace collection & console logs
  timeout: Duration(seconds: 5)
);

3. Make a request

final uri = Uri.parse('https://api.example.com/verify');
final result = await AuthmatechSdkFlutter.open(
  url: uri,
  accessToken: 'your_bearer_token',   // optional
  operators: '6553565535,6553565535',  // optional MNO hints
);

if (result.error != null) {
  // Error path
  print('Error code: ${result.error}');
  print('Description: ${result.errorDescription}');
  if (result.debugInfo != null) {
    print('Trace: ${result.debugInfo!.urlTrace}');
  }
} else {
  // Success path
  final body = result.responseBody!;
  print('Status: ${result.httpStatus}');
  print('AuthmatechCode: ${body.authmatechCode}');
  print('MNO ID: ${body.mnoId}');
}

Response Format

Success

{
  "httpStatus": 200,
  "responseBody": {
    "authmatechCode": "base64-string",
    "mnoId": "1",
    "errorCode": "0",
    "errorDesc": "Authmatech Code successfully fetched"
  },
  "debugInfo": {
    "deviceInfo": "iPhone13,4; iOS/18.4.1",
    "urlTrace": "...trace logs..."
  }
}

Error

{
  "error": "sdk_no_data_connectivity",
  "errorDescription": "Data connectivity not available",
  "debugInfo": { /* optional trace */ }
}

Error Codes

Code Description
sdk_no_data_connectivity No cellular data connection available
sdk_connection_error Underlying connection or timeout error
sdk_redirect_error Too many or invalid redirects
sdk_error Internal SDK error

Platform Support

  • Android

    • Min SDK: 26 (Android 8.0)
    • Recommended: 30+ (Android 11+)
  • iOS

    • Min OS: 12.0

Authmatech Detection Policy

  1. SDK forces HTTP requests over cellular only.
  2. A GET to your URL returns an encrypted Authmatech code in the response JSON.
  3. Your backend must respond on HTTPS and include fields encMSISDN, opId, etc., in JSON.

Requirements

  • Active cellular data plan
  • Supported MNO on network
  • Internet permission (Android) / ATS exceptions if needed (iOS)

Security & Privacy

  • ๐Ÿ” All requests use TLS (HTTPS only)
  • ๐Ÿ”’ Authmatech data is encrypted by the network operator
  • ๐Ÿšซ No personal data retained in SDK logs
  • โš™๏ธ Debug logs are off by default in release builds

Example

See the fully working example app in this repo under example/.


License

Distributed under the MIT License. See LICENSE for details.