flutter_secure_auth 1.0.0
flutter_secure_auth: ^1.0.0 copied to clipboard
A secure, lightweight authentication package for Flutter (REST + OAuth2 PKCE + token refresh) with secure local storage.
1.0.0 #
Major feature release — easier to use, more reactive, and more compatible.
- New:
authStateChangesstream onAuthServicefor reactive UI updates withStreamBuilder<AuthState>. - New:
isAuthenticatedasync getter for quick session checks. - New:
AuthService.create(baseUrl)factory constructor — zero boilerplate for standard OAuth2 APIs. - New:
AuthInterceptor— a drop-inhttp.BaseClientthat auto-injectsAuthorizationheaders and handles401retries transparently. - New:
AuthErrorCodeenum for typed, readable error handling in catch blocks (replaces magic status code integers). - New:
AuthTokens.copyWith()— update specific token fields without recreating the whole object. - New:
AuthTokens.hasRefreshTokengetter for convenient refresh capability checks. - New:
AuthStatesealed class (AuthenticatedState/UnauthenticatedState) for pattern matching on auth state. - New:
AuthService.dispose()to cleanly release timers and close the auth state stream. - Updated: Barrel file now exports
TokenStorage,PkcePair,AuthState, andAuthInterceptorpublicly. - Updated: Full README rewrite with examples for all new APIs.
- Updated: Example app fully rewritten to demonstrate all v1.1.0 features.
0.1.8 #
- Added extensible
readGuardcallback toTokenStorage(enabling seamless biometric/FaceID/TouchID unlock implementation by developer applications). - Handled
readGuarderrors in storage retrieval (ensuring failed biometric checks do not wipe stored credentials). - Wrote unit tests for
readGuardvalidation checks. - Expanded
flutter_secure_storagedependency constraint to support11.0.0version release. - Validated package stability, static analysis, and unit test suites on v11.0.0.
0.1.7 #
- Upgraded testing and code generation dependencies (
json_serializable,build_runner,mockito) to their latest compatible versions. - Validated package stability and analysis compliance under upgraded dependency constraints.
0.1.6 #
- Upgraded dependencies to latest versions (
flutter_secure_storageto^10.3.1, etc.). - Fully resolved pub.dev WebAssembly (WASM) compatibility check issues.
- Fixed PKCE
codeVerifiercharacter set generation to strictly conform to RFC 7636 unreserved format. - Improved error resiliency during token refreshing (transient network / server 5xx failures no longer wipe credentials).
- Implemented self-healing storage capability for corrupted JSON inputs.
0.1.5 #
(Empty release)
0.1.4 #
[0.1.4] - 2025-10-15 #
🎉 Updated Release #
- Introduced
flutter_secure_auth— a secure, lightweight Flutter authentication utility. - Added
AuthTokensmodel:- Manages
accessToken, optionalrefreshToken, andexpirytimestamp. - Includes helpers for
isExpiredandtimeToExpiry.
- Manages
- Added
TokenStorageservice:- Uses
FlutterSecureStoragefor safe, encrypted token persistence. - Supports
save,read, andclearmethods.
- Uses
- Added
PkcePairgenerator:- Generates RFC 7636–compliant PKCE code verifier and challenge.
- Includes random state UUID for OAuth 2.0 flow integrity.
- Added
AuthExceptionclass for consistent, type-safe error handling. - Added
AuthServiceabstraction (extensible for Supabase, Firebase, etc.). - Fully documented all public APIs with DartDoc (≥ 20% coverage requirement).
- Implemented null safety and Flutter 3.0+ compatibility.
- 100% lint-compliant (
analysis_options.yamlincluded). - Added basic unit tests and example app for demo usage.
[Unreleased] #
🚧 Planned #
- Add built-in SupabaseAuthService implementation.
- Add optional refresh token auto-renewal logic.
- Add integration with flutter_bloc and riverpod state management.
- Provide sample OAuth2 / PKCE login flow demo.
- Add biometric unlock support for token retrieval.
- Improve test coverage and CI workflows.
0.1.3 #
[0.1.3] - 2025-10-10 #
🎉 Initial Release #
- Introduced
flutter_secure_auth— a secure, lightweight Flutter authentication utility. - Added
AuthTokensmodel:- Manages
accessToken, optionalrefreshToken, andexpirytimestamp. - Includes helpers for
isExpiredandtimeToExpiry.
- Manages
- Added
TokenStorageservice:- Uses
FlutterSecureStoragefor safe, encrypted token persistence. - Supports
save,read, andclearmethods.
- Uses
- Added
PkcePairgenerator:- Generates RFC 7636–compliant PKCE code verifier and challenge.
- Includes random state UUID for OAuth 2.0 flow integrity.
- Added
AuthExceptionclass for consistent, type-safe error handling. - Added
AuthServiceabstraction (extensible for Supabase, Firebase, etc.). - Fully documented all public APIs with DartDoc (≥ 20% coverage requirement).
- Implemented null safety and Flutter 3.0+ compatibility.
- 100% lint-compliant (
analysis_options.yamlincluded). - Added basic unit tests and example app for demo usage.
[Unreleased] #
🚧 Planned #
- Add built-in SupabaseAuthService implementation.
- Add optional refresh token auto-renewal logic.
- Add integration with flutter_bloc and riverpod state management.
- Provide sample OAuth2 / PKCE login flow demo.
- Add biometric unlock support for token retrieval.
- Improve test coverage and CI workflows.