🔐 A Flutter package to add secure Two-Factor Authentication (2FA) via time-based one-time passwords (TOTP) to any Flutter application with ease.
📸 Screenshots
✨ Features (v1.0.5 Upgrade)
Quick Setup: Generates a standard cryptographically secure TOTP secret key compatible with Google Authenticator, Microsoft Authenticator, Authy, etc.
QR Code Generation: Integrated visual setup flow using dynamic QR codes.
Copy-to-Clipboard: Fallback configuration flow allowing users to copy the raw setup key manually.
Secure OTP Verification: Standard input interface using high-quality pin inputs (pinput integration).
🎨 Custom UI Themes: Override background colors, text colors, AppBars, button styles, and PIN input decorations to match your app's design system.
🔒 Secure Storage: Optional encrypted storage backend via flutter_secure_storage to secure secret keys and recovery codes.
🛡️ Biometric Authentication: Quick local unlock (Face ID / Touch ID / Fingerprint) via local_auth integration.
🧩 Backup Recovery Codes: Generates 10 static recovery codes during activation. Displayed under a space-saving collapsible accordion. Users can use these codes as a login fallback.
[!NOTE]
To support newer platform libraries and Dart 3.x, transitive dependency upgrades have been applied (specifically upgrading internal Windows helpers which removes deprecated win32 3.1.3 conflicts).
⚙️ Android Toolchain Requirements
To compile successfully with newer dependency versions (e.g. Kotlin 2.x and Java 21), make sure your Android project files are configured as follows:
Gradle Wrapper: Version 8.14.0 or higher (gradle-wrapper.properties).
Android Gradle Plugin (AGP): Version 8.11.1 or higher (settings.gradle).
Kotlin: Version 2.2.20 or higher (settings.gradle).
Compile SDK: Version 34 or higher (app/build.gradle).