The flutter_ts_authentication is a Flutter plugin for Mosaic Authentication on Android and iOS. It provides secure authentication methods for Flutter applications, including PIN codes, biometrics, WebAuthn, TOTP, and device key signing. It wraps both Apple's public-private key authentication for passkeys on iOS and Google's Credential Manager API for passkeys on Android, delivering a unified native experience for FIDO2-based authentication.
For additional integration guides such as configuring passkeys and advanced platform-specific features, refer to the native SDK documentation:
- WebAuthn passkey registration and authentication
- Native biometric authentication (FaceID/TouchID on iOS, fingerprint/face on Android)
- Transaction signing with WebAuthn and native biometrics
- PIN code registration and authentication
- TOTP registration and code generation
- Device key signing
- Device info and WebAuthn support detection
- iOS 15.0+, Xcode 14+
- Android API 23+, compileSdkVersion 34+
- Flutter SDK
Add the dependency to your pubspec.yaml:
dependencies:
flutter_ts_authentication:
git:
url: https://github.com/TransmitSecurity/flutter_ts_authentication.git
ref: 0.0.3Install dependencies:
flutter pub getAdd biometric permission to ios/Runner/Info.plist:
<key>NSFaceIDUsageDescription</key>
<string>This app uses Face ID for secure authentication</string>This module uses Swift Package Manager (SPM) for iOS dependencies. No additional CocoaPods setup is required.
import 'package:flutter_ts_authentication/flutter_ts_authentication.dart';
final auth = FlutterTsAuthentication();
await auth.initializeSDK();Alternatively, initialize with explicit parameters:
final initOptions = TSInitOptions(
webAuthnInitOptions: TSWebAuthnInitOptions(
startAuthentication: '/auth/webauthn/authenticate',
startRegistration: '/auth/webauthn/register',
),
);
await auth.initialize(
'CLIENT_ID',
'your-domain.com',
'https://api.transmitsecurity.io',
initOptions
);| Region | Base URL |
|---|---|
| US | https://api.transmitsecurity.io/ |
| EU | https://api.eu.transmitsecurity.io/ |
| Canada | https://api.ca.transmitsecurity.io/ |
| Australia | https://api.au.transmitsecurity.io/ |
| Japan | https://api.gasne1-ts01.transmitsecurity.io/ |
| Sandbox | https://api.sbx.transmitsecurity.io/ |
| Custom domain | https://<your-domain>.com/ (see Custom domains) |
Once initialized, implement authentication flows using the available functions.