biometric_iot_bridge 0.1.2
biometric_iot_bridge: ^0.1.2 copied to clipboard
Securely authenticate users with biometrics and trigger remote IoT actions via MQTT. Designed for Flutter apps requiring hardware-level trust and device control.
cat > README.md << 'EOF'
biometric_iot_bridge #
Flutter biometric authentication and secure MQTT IoT bridge. Verify users with platform biometrics, generate cryptographic tokens, and trigger trusted device actions with hardware-level security.
โจ What is biometric_iot_bridge? #
biometric_iot_bridge is a Flutter plugin that connects device biometrics with secure token generation and IoT device signaling.
It allows Flutter apps to securely:
- Verify users using fingerprint / face / device credentials
- Generate cryptographically secure tokens
- Send trusted commands to IoT devices via MQTT
This package is designed for security-sensitive, device-aware, and remote-control workflows.
๐ Core Capabilities #
| Feature | Description |
|---|---|
| โ Biometric Auth | Native platform APIs (fingerprint, face, device pin) |
| โ Secure Tokens | Cryptographic hashing โ no raw biometric storage |
| โ MQTT Signaling | Publish tokens to IoT topics via MQTT |
| โ Flutter-First | Clean, minimal Dart API |
| โ Multi-Platform | Android, iOS, Windows, macOS |
๐ฆ Installation #
Add to your pubspec.yaml:
dependencies:
biometric_iot_bridge: ^0.1.0
Then fetch packages:
flutter pub get
โ๏ธ Platform Setup #
Android #
Add to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
iOS #
Add to ios/Runner/Info.plist:
<key>NSFaceIDUsageDescription</key>
<string>This app uses Face ID / Touch ID to verify your identity.</string>
Windows / macOS #
No additional setup required. Uses native device authentication APIs.
๐ Quick Start #
1. Import #
import 'package:biometric_iot_bridge/biometric_iot_bridge.dart';
2. Initialize #
final bridge = BiometricIotBridge();
3. Verify Biometrics #
final authenticated = await bridge.verifyBiometrics();
if (!authenticated) {
print("Authentication failed");
return;
}
4. Generate Secure Token #
final token = bridge.generateSecureToken("my_secret_key");
5. Send Signal to IoT Device #
await bridge.sendRemoteSignal("iot/unlock", token);
๐ Full End-to-End Example #
import 'package:flutter/material.dart';
import 'package:biometric_iot_bridge/biometric_iot_bridge.dart';
class SecureUnlockPage extends StatefulWidget {
@override
_SecureUnlockPageState createState() => _SecureUnlockPageState();
}
class _SecureUnlockPageState extends State<SecureUnlockPage> {
final bridge = BiometricIotBridge();
String _status = "Ready";
Future<void> _triggerUnlock() async {
setState(() => _status = "Verifying biometrics...");
final authenticated = await bridge.verifyBiometrics();
if (!authenticated) {
setState(() => _status = "Authentication failed.");
return;
}
setState(() => _status = "Generating token...");
final token = bridge.generateSecureToken("your_secret_key");
setState(() => _status = "Sending signal...");
await bridge.sendRemoteSignal("iot/door/unlock", token);
setState(() => _status = "โ
Door unlocked!");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Secure IoT Unlock")),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(_status, style: TextStyle(fontSize: 18)),
SizedBox(height: 24),
ElevatedButton.icon(
icon: Icon(Icons.fingerprint),
label: Text("Authenticate & Unlock"),
onPressed: _triggerUnlock,
),
],
),
),
);
}
}
๐ Security Design #
This package follows a non-invasive security model:
- Uses platform-native biometric APIs โ no raw biometric data is accessed
- Does NOT store fingerprint or face data
- Token generation uses cryptographic hashing via the
cryptopackage - Designed for trust signaling, not identity management
โ ๏ธ Important: Developers must still validate tokens server-side or device-side.
๐งฉ Example Use Cases #
- ๐ Smart locks and secure physical access
- ๐ IoT home automation with biometric gating
- ๐ญ Industrial device control with hardware-level trust
- ๐ Device-bound authorization flows
- ๐ก๏ธ Multi-factor security architectures
- ๐ก Trusted remote command pipelines
โ๏ธ Supported Platforms #
| Platform | Status |
|---|---|
| Android | โ Supported |
| iOS | โ Supported |
| Windows | โ Supported (device auth dependent) |
| macOS | โ Supported |
| Linux | โ ๏ธ Biometric API dependent |
๐ API Reference #
verifyBiometrics() #
Future<bool> verifyBiometrics()
Triggers platform biometric authentication. Returns true on success.
generateSecureToken(String secret) #
String generateSecureToken(String secret)
| Parameter | Type | Description |
|---|---|---|
secret |
String |
Your app secret key for token generation |
Returns a hex-encoded hash token string.
sendRemoteSignal(String topic, String token) #
Future<void> sendRemoteSignal(String topic, String token)
| Parameter | Type | Description |
|---|---|---|
topic |
String |
MQTT topic e.g. "iot/door/unlock" |
token |
String |
Token from generateSecureToken() |
๐ฆ Dependencies #
| Package | Version | Purpose |
|---|---|---|
local_auth |
^2.0.0 |
Platform biometric authentication |
mqtt_client |
^10.0.0 |
MQTT messaging |
crypto |
^3.0.0 |
Secure token generation |
๐ Design Goals #
biometric_iot_bridge prioritizes:
- Predictability โ clear, consistent API behaviour
- Minimal abstraction โ thin wrapper, easy to extend
- Security-aware defaults โ no data stored, no raw biometric access
- Easy integration โ works with any MQTT broker or backend
๐ค Contributing #
Contributions and suggestions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes
- Submit a pull request
Repository: https://github.com/SEOSiri-Official/biometric_iot_bridge
๐ License #
MIT License. See LICENSE for details.
๐ Attribution & Maintenance #
Developed by Momenul Ahmad ยท SEOSiri
โญ Support #
If this package is useful:
- โญ Star the GitHub repository
- ๐ Like on pub.dev
- ๐ฌ Share with other Flutter developers
- ๐ Report issues or suggest improvements EOF