firebase_phone_auth_handler
2.0.1, released 3 months ago by rithikbhandari.dev
Easy Firebase phone authentication with OTP sending, verification, and auto-fetch support.
What it does
Simplifies phone number authentication using Firebase Auth by managing the OTP request and verification process. Features built-in SMS autofill support for Android and handles reCAPTCHA on Web automatically.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are implementing Firebase phone authentication in your Flutter application.
- You want automated SMS OTP auto-fetch support on Android.
- You need a widget-based approach to manage phone verification states.
Skip it when
- You are not using Firebase as your backend authentication provider.
- You require custom multi-factor authentication flows outside standard phone number verification.
Strengths
- Supports auto-fetch OTP via SMS on Android out of the box.
- Handles cross-platform flows cleanly across Android, iOS, and Web.
- Widget-based controller lifecycle ensures no state leaks between screens.
Weaknesses
- Requires specific platform configurations such as SHA-1/SHA-256 fingerprints on Android and custom URL schemes on iOS.
- Tied directly to Firebase Authentication.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 2
Requires enabling Phone auth in the Firebase console, registering SHA certificate fingerprints on Android, and adding a custom URL scheme in iOS Info.plist.
FirebasePhoneAuthHandler(
phoneNumber: '+911234567890',
builder: (context, controller) => Scaffold(
body: Center(
child: Text('Status: ${controller.otpSendStatus}'),
),
),
)Alternatives
Packages that do the same job and could replace firebase_phone_auth_handler.
- firebase_auth_web
Web implementation of Firebase Authentication for Flutter
85Compare - firebase_ui_oauth
Firebase UI OAuth widgets for authentication with social providers
84Compare - firebase_ui_oauth_google
Flutter widgets for Google OAuth sign‑in using Firebase UI.
81Compare - firebase_ui_oauth_apple
Firebase UI widgets for Sign in with Apple authentication.
77Compare
Works with
Packages commonly used together with firebase_phone_auth_handler: ones it builds on, ones built on it, and its own family.
- firebase_authfirebase_phone_auth_handler depends on itFlutter plugin for Firebase Authentication enabling passwords, phone numbers, and identity providers.
- providerfirebase_phone_auth_handler depends on itA lightweight wrapper around InheritedWidget for state management
- firebase_notifications_handlerSame familyHandle Firebase Cloud Messaging notifications with built-in local notifications support.