app_auth_manager
A comprehensive Flutter app auth manager package that provides authentication support.
1.0.6
63 downloads/mo
#3191 most downloaded on pub.dev
bahricanyesil/flutter-app-auth-manager
What this package is like to depend on
Last release 1 years ago
30 Jun 2025
Too new to tell
only 1 release windows
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
7 releases · first in 2025
0 releases in the last 12 months
see the full history below
Release timeline
7 releases · Jun 2025 to Jun 2025
2026
Releases
latest 7-
1.0.630 Jun 2025Release notes
Open source →Fixed
- Removed redundant refreshAuthState() call during initialization: Firebase's
authStateChanges()listener automatically emits the current auth state when it starts listening, so the manual refresh was causing duplicate state emissions and potential race conditions. This improves stream reliability and prevents misleading state changes.
- Removed redundant refreshAuthState() call during initialization: Firebase's
-
1.0.529 Jun 2025 -
1.0.429 Jun 2025 -
1.0.329 Jun 2025Release notes
Open source →Improved
- Stream-based Authentication State: Enhanced authStateStream to properly emit current state for new subscribers
-
1.0.229 Jun 2025 -
1.0.123 Jun 2025Release notes
Open source →- Update error handling in authentication flows to display 'Unknown error' when error message is null
-
1.0.022 Jun 2025Release notes
Open source →Added
- Core Authentication Interface: Abstract
IAuthManagerinterface for dependency inversion - Comprehensive Data Models: Type-safe models using flutter_shared_utilities BaseDataModel
AuthUserModel: Complete user profile information with provider dataAuthStateModel: Real-time authentication state managementAuthResultModel: Detailed operation results with success/failure statesAuthErrorModel: Comprehensive error handling with user-friendly messages
- Firebase Authentication Implementation: Full Firebase Auth integration
- Email/password authentication (sign in, sign up)
- Anonymous authentication
- Google Sign-In integration
- Apple Sign-In integration
- Account deletion functionality
- Social Authentication Support:
- Google Sign-In with full profile data
- Apple Sign-In with privacy-focused implementation
- Extensible framework for additional providers
- Authentication State Management:
- Real-time state updates via streams
- Authentication status tracking (authenticated, unauthenticated, unknown)
- Loading state management
- Error state handling
- Comprehensive Error Handling:
- Firebase Auth error conversion
- User-friendly error messages
- Error categorization (network, user, system, permission)
- Retryable error identification
- Validation Utilities:
- Email format validation
- Phone number format validation
- Password strength validation with scoring (0-4)
- Provider support validation
- Session Management Framework:
- Session timeout configuration
- Token refresh capabilities
- Session validation methods
- Analytics and Monitoring:
- Authentication operation statistics
- Debug logging capabilities
- Authentication event tracking
- Configuration Management:
- Configurable authentication settings
- Provider capability management
- Debug mode toggle
- Example Application: Complete Flutter app demonstrating:
- Authentication state management
- Email/password authentication
- Social authentication (Google, Apple)
- Anonymous authentication
- User profile display
- Account deletion
- Error handling
- Comprehensive Documentation:
- Detailed README with setup instructions
- API documentation
- Best practices guide
- Troubleshooting section
- Migration guide from firebase_auth
Dependencies
flutter_shared_utilities: ^1.0.5- Type-safe data models and utilitiesfirebase_core: ^3.14.0- Firebase core functionalityfirebase_auth: ^5.6.0- Firebase authentication servicesgoogle_sign_in: ^6.3.0- Google Sign-In integrationsign_in_with_apple: ^7.0.1- Apple Sign-In integrationlocal_auth: ^2.3.0- Biometric authentication supportcrypto: ^3.0.6- Cryptographic utilities for secure operationsdart_jsonwebtoken: ^3.2.0- JWT token handling and validationapp_logger_manager: ^1.0.2- Comprehensive logging and debugging
Project Structure
lib/ ├── src/ │ ├── constants/ │ │ └── auth_constants.dart # Authentication constants │ ├── interfaces/ │ │ └── i_auth_manager.dart # Abstract authentication interface │ ├── models/ │ │ ├── auth_user_model.dart # User data model │ │ ├── auth_state_model.dart # Authentication state model │ │ ├── auth_result_model.dart # Operation result model │ │ └── auth_error_model.dart # Error handling model │ ├── implementations/ │ │ └── firebase_auth_manager.dart # Firebase implementation │ └── mixin/ │ ├── auth_error_mixin.dart # Error handling utilities │ ├── auth_mixin.dart # Core authentication utilities │ ├── auth_provider_mixin.dart # Provider-specific utilities │ └── auth_validation_mixin.dart # Validation utilities └── app_auth_manager.dart # Main export file example/ ├── lib/ │ ├── main.dart # Main application entry │ ├── auth_example_app.dart # App configuration │ ├── pages/ # Application pages │ ├── theme/ # App theming │ └── widgets/ # Reusable widgets ├── android/ # Android configuration ├── ios/ # iOS configuration └── firebase.json # Firebase configurationFeatures Overview
- ✅ Email/Password Authentication - Complete sign-up and sign-in flow
- ✅ Anonymous Authentication - Guest access functionality
- ✅ Google Sign-In - Full profile integration
- ✅ Apple Sign-In - Privacy-focused authentication
- ✅ Account Management - Profile updates and account deletion
- ✅ Error Handling - Comprehensive error management
- ✅ State Management - Real-time authentication state
- ✅ Validation - Input validation and password strength
- ✅ Analytics - Authentication operation tracking
- ⏳ Phone Authentication - SMS verification (planned)
- ⏳ Email Verification - Email confirmation flow (planned)
- ⏳ Password Reset - Password recovery (planned)
- ⏳ Multi-Factor Authentication - Enhanced security (planned)
- ⏳ Biometric Authentication - Fingerprint/Face ID (planned)
- ⏳ Additional Social Providers - Facebook, Twitter, GitHub (planned)
API Overview
// Initialize authentication manager using factory constructor final authManager = await FirebaseAuthManager.create(); // Email/password authentication final signUpResult = await authManager.signUpWithEmailAndPassword( email: '[email protected]', password: 'securePassword123', displayName: 'John Doe', ); final signInResult = await authManager.signInWithEmailAndPassword( email: '[email protected]', password: 'securePassword123', ); // Social authentication final googleResult = await authManager.signInWithGoogle(); final appleResult = await authManager.signInWithApple(); // Anonymous authentication final anonymousResult = await authManager.signInAnonymously(); // State management StreamBuilder<AuthStateModel>( stream: authManager.authStateStream, builder: (context, snapshot) { final state = snapshot.data ?? AuthStateModel.initial(); return state.isAuthenticated ? HomePage(user: state.user!) : LoginPage(); }, ); // Error handling if (result.isFailure) { final userMessage = authManager.getUserFriendlyErrorMessage(result.errorCode); ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text(userMessage)), ); }Documentation
- Setup Guide: Complete Firebase, Google, and Apple Sign-In configuration
- API Reference: Detailed method documentation
- Best Practices: Security and implementation guidelines
- Migration Guide: Easy migration from firebase_auth package
- Troubleshooting: Common issues and solutions
- Example App: Full working implementation
Testing
- Abstract interface enables easy mocking for unit tests
- Example app provides integration testing reference
- Comprehensive error handling for robust testing scenarios
Security Features
- Input validation for all authentication methods
- Password strength validation with configurable requirements
- Session timeout management
- Secure token handling
- Error message sanitization
- Provider-specific security implementations
Performance
- Lazy initialization of authentication providers
- Efficient state management with streams
- Minimal dependencies for core functionality
- Optimized for production use
Accessibility
- User-friendly error messages
- Comprehensive documentation
- Clear API design
- Support for assistive technologies
- Core Authentication Interface: Abstract