Skip to content
pubscout

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.

WASM-ready
$ flutter pub add firebase_phone_auth_handler
Source repository

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.

Works with

Packages commonly used together with firebase_phone_auth_handler: ones it builds on, ones built on it, and its own family.