Skip to content
pubscout

smart_auth

4.0.0, released 2 weeks ago by tornike.dev

Flutter wrapper for Android SMS autofill, phone number hints, and Credential Manager.

WASM-readyRock solid
$ flutter pub add smart_auth
Source repository

What it does

Allows Flutter apps on Android to read one-time SMS verification codes via the SMS Retriever or User Consent APIs, request SIM-based phone number hints, and manage passwords and passkeys using Android's Credential Manager.

AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to implement automated or user-confirmed SMS OTP autofill on Android.
  • You need to provide phone number hints or integrate Android Credential Manager for passkeys and passwords.

Skip it when

  • Your app targets iOS or web platforms since this package is Android only.
  • You are looking for a complete cross-platform authentication UI kit.

Strengths

  • Supports multiple modern Android authentication and autofill APIs including SMS Retriever, User Consent, and Credential Manager.
  • Provides a simple singleton interface with clear success, cancellation, and error handling results.

Weaknesses

  • Restricted to Android platform only.
  • Requires specific Android SDK and Gradle version configurations.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
1

Requires compileSdk 35 or above, Java 11+, and specific AGP/Gradle/Kotlin configurations depending on your Flutter version.

import 'package:smart_auth/smart_auth.dart';

final smartAuth = SmartAuth.instance;
final res = await smartAuth.requestPhoneNumberHint();
if (res.hasData) {
  // Use the phone number
}

Alternatives

Packages that do the same job and could replace smart_auth.

  • pinput

    If you specifically need a customizable PIN / OTP input field widget.