Overview
SmartAuth is a Flutter package that simplifies OTP and SMS-based authentication on Android by leveraging the Android SMS User Consent API and SMS Retriever API. It enables automatic detection and reading of one-time passwords (OTPs) from incoming SMS, supports auto-fill of OTPs in forms, and retrieves user phone numbers securely. Designed for seamless integration with PIN, OTP, and password fields, it enhances user experience by reducing manual input. The package is platform-specific, working exclusively on Android.
Use cases
- Auto-detecting OTP from SMS
- Automatically filling OTP in login forms
- Reading user phone number from SMS
- Enhancing login flow with SMS autofill
- Simplifying two-factor authentication
- Reducing user input errors in OTP entry
Key features
- Automatic OTP extraction from SMS
- Secure phone number retrieval
- Android-only SMS autofill support
- Simple integration with text fields
- Real-time SMS monitoring
- Complies with Android's SMS Retriever API
Suitable for
- Android apps requiring OTP auto-fill
- Apps using SMS-based 2FA
- Developers seeking native SMS integration
- User flows with SMS verification
- Apps aiming to reduce friction in login
Considerations
- Only works on Android
- Requires proper SMS format for detection
- Needs runtime permissions for SMS access
- Limited to devices with Google Play Services
- Depends on SMS Retriever API availability
