biometric_auth_login 1.1.0
biometric_auth_login: ^1.1.0 copied to clipboard
Backend-agnostic biometric (Face ID / Touch ID / fingerprint) unlock gate with secure secret storage and a ready-made login button for Flutter.
1.1.0 #
Dependency modernization, concurrency safety, and a richer result API. No breaking changes to existing method signatures.
Changed #
- Migrated to
local_auth3.x and supportflutter_secure_storage11.x (constraints:local_auth: '>=3.0.0 <4.0.0',flutter_secure_storage: '>=9.0.0 <12.0.0').local_auth3.x error handling (LocalAuthException) replaces the removederror_codes.dart.Note: the minimum
local_authis now 3.0.0. Apps pinned tolocal_auth2.x must upgrade. isEnabled()now checks only the lightweight "enabled" flag and no longer reads/decrypts the secret. This makes it cheaper and letsunlock()report a secret decrypt/read failure asstorageError(previously misreported asnotEnabled).AndroidOptionsdefault no longer sets the removedencryptedSharedPreferencesflag; Keystore-backed cipher storage is used and legacy data is auto-migrated.
Added #
- Overlapping-prompt protection:
saveSecret/unlockon the same instance no longer show two system prompts at once. A rejectedunlockreturns the newBiometricStatus.busy; a rejectedsaveSecretreturnsfalse. BiometricStatus.busyenum value.BiometricStatusXextension:isSuccess,canRetry,requiresDeviceSetup,requiresEnrollmentInApp,shouldFallBack.BiometricLogin.canAuthenticate()andgetAvailableBiometrics().BiometricService.getAvailableBiometrics().- pub metadata:
topicsand explicitplatforms(android, ios, macos, windows).
Docs & tests #
- README rewritten: accurate platform matrix, comparison table, FAQ, use cases, security section, and result-handling guide.
- Added tests for concurrency, storage failures, lifecycle transitions, the status extension, capability methods, and gate-mode button callbacks.
1.0.0 #
Initial release.
BiometricLoginfacade:isAvailable,hasHardware,getBiometricKind,isEnabled,saveSecret,unlock,deleteSecret.- Backend-agnostic opaque secret model — the package never interprets the stored value.
BiometricLoginButtonwidget with auto icon/label detection, loading state, theme-aware styling (BiometricButtonStyle), and gate/manual modes.BiometricConfigfor keys, prompt reasons, and Keystore/Keychain options.- Pluggable
BiometricSecretStorage(defaultSecureBiometricStoragebacked byflutter_secure_storage). - Unit and widget tests; runnable
example/app.