auth_grace 0.0.6
auth_grace: ^0.0.6 copied to clipboard
Smart biometric auth with grace period. Skips prompt if phone was recently unlocked.
0.0.6 #
- Added
persistAcrossBackgroundingoption toAuthGraceOptions— controls whether the biometric prompt stays visible when the app is backgrounded mid-auth. Defaults totrue. - Added 28 unit tests covering
AuthGraceOptions,AuthResult,AuthGraceconstructor,init(),authenticate(),isWithinGracePeriod(),isHardwareBacked(), andreset(). - Added integration tests (
integration_test/) for native Keystore/Keychain calls — runs on real device or emulator without triggering the biometric prompt. - README: Added
## Security modelsection — documents what the package protects against, known limitations, and appropriate vs. inappropriate use cases. - README: Demo GIF is now centered and resized for better readability.
0.0.5 #
- Fix: Example app now included in published package so pub.dev awards the example score point.
- Fix: Dart formatting applied to
lib/src/auth_grace_base.dartto pass static analysis on pub.dev. - Added demo GIF to README.
0.0.4 #
- Fix: README demo GIF now renders correctly on pub.dev.
0.0.3 #
- Fix:
init()now always regenerates the Keystore key so changes togracePeriodSecondstake effect immediately without requiring a reinstall. - Fix: Grace period countdown is now driven by
isWithinGracePeriod()polled every second — locks exactly when the Keystore expires, not based on a drifting Dart timer. - Fix:
gracePeriodActive(device-unlock grace) now shows the countdown timer in the example app. - Example: Added circular countdown UI showing remaining grace window in seconds, turns orange at 2 seconds remaining.
- Example: Grace period timer auto-locks the UI when expired — no automatic re-prompt.
0.0.2 #
- Fix: Updated
authenticate()call forlocal_auth3.x API —AuthenticationOptionsreplaced with flat parameters (biometricOnly,persistAcrossBackgrounding). allowDeviceCredential: falsenow correctly maps tobiometricOnly: truein the prompt.- Added pub.dev topic tags:
authentication,biometrics,security,local-auth. - Raised minimum Dart SDK constraint to
>=3.9.0to align withflutter_lints ^6.0.0. - Upgraded
flutter_lintsto^6.0.0— zero lint issues. - Fix:
LocalAuthExceptioncodes now map to correctAuthStatusinstead of always returningAuthStatus.error.noCredentialsSet,noBiometricsEnrolled,noBiometricHardware→AuthStatus.notAvailable.userCanceled,timeout,systemCanceled,userRequestedFallback→AuthStatus.failed.- All other codes (lockout, device error, etc.) remain
AuthStatus.error.
0.0.1 #
- Initial release.
- Smart biometric authentication with automatic grace period.
- Android implementation using Keystore with time-bound keys.
- iOS implementation using Keychain timestamp tracking.
- Support for
alwaysRequiremode for payment confirmation flows.