navojit_auth_flutter 4.0.4
navojit_auth_flutter: ^4.0.4 copied to clipboard
A high-performance, Rust-powered Sovereign Authentication Engine for Flutter. Features zero-jank JWT generation, anti-reverse engineering security, and hardware biometric locks.
Navojit Sovereign Core 🛡️ #
A high-performance, universal authentication engine for the Navojit Ecosystem. Built with a Rust core and bridged to Flutter, it delivers enterprise-grade security, anti-reverse engineering protection, and zero-jank execution.
✨ Why Sovereign Core? #
- 🛡️ Unhackable Logic: Cryptography and JWT generation run entirely in compiled C-level native binaries via Rust (
.so), making reverse engineering nearly impossible. - ⚡ Zero UI Jank: Heavy cryptographic operations are offloaded to isolated Rust threads.
- 🔐 Hardware-Level Security: Integrated with Android/iOS biometric systems (Face ID / Fingerprint) for true hardware-backed session locks.
- 📦 Universal Architecture: Pre-compiled for
arm64-v8a,armeabi-v7a,x86_64, andx86.
📦 Installation #
Add this to your package's pubspec.yaml file:
dependencies:
navojit_auth_flutter: ^4.0.3
(Or run flutter pub add navojit_auth_flutter in your terminal)
⚙️ Setup Requirements #
🤖 Android #
Ensure your android/app/build.gradle.kts (or .gradle) meets these minimum requirements for the Rust engine and modern local auth plugins:
android {
compileSdk = 36 // Required by local_auth
defaultConfig {
minSdk = 21 // Required by Rust NDK bridge
targetSdk = 36
}
}
Important: Your MainActivity must extend FlutterFragmentActivity instead of FlutterActivity to support biometric prompts.
🍎 iOS #
To use FaceID/Biometrics on iOS, add the following key to your ios/Runner/Info.plist file:
<key>NSFaceIDUsageDescription</key>
<string>We need your Face ID to securely authenticate your session.</string>
🚀 Quick Start #
1. Initialize the Engine #
Always initialize the Rust bridge before running your app:
import 'package:navojit_auth_flutter/navojit_auth_flutter.dart';
import 'package:flutter/material.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await NavojitAuth.init(); // Boot up the Rust Engine
runApp(const MyApp());
}
2. Authenticate & Verify #
Generate secure tokens and verify them instantly:
// Initialize with your secure secret
final auth = NavojitAuth(secret: "your-secure-secret");
// 1. Issue Identity (Rust-powered token generation)
final tokens = await auth.issueNewIdentity(
userId: "dev_user_007",
email: "kashish@navojit.com",
role: "admin",
);
// 2. Hardware Biometric Check
bool isVerified = await auth.authenticateBiometric(
reason: 'Scan fingerprint to access the dashboard',
);
// 3. Smart Session Verification
final claims = await auth.verifySession();
if (claims != null) {
print("Welcome back, ${claims.sub}! Role: ${claims.role}");
}
👨💻 About the Author #
Built with ❤️ by Kashish Singh (aka Kashish Singh Rai)
- 🌐 Website: navojit.com
- 🐙 GitHub: @kashishsinghrai
- 🎯 Mission: Bringing uncompromised, sovereign security to the Flutter ecosystem.