Search packages, repositories and app categories

Package detailsv1.0.6

native_auth

this package is to implement faceID, touchID and fingerprint authentication

AndroidiOSWindows
30-day downloads
49
Likes
32
Pub points
150

Install package

flutter pub add native_auth

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Native Auth is a Flutter package that enables biometric authentication using Face ID, Touch ID, and fingerprint recognition on Android and iOS devices. It provides a simple interface to integrate secure local authentication into apps, enhancing user experience with quick and reliable identity verification. The package supports Windows as well, making it suitable for cross-platform applications. Built with native platform APIs, it ensures compatibility and performance. Developers can easily implement secure login or sensitive action confirmation with minimal code. The source code is publicly available on GitHub for transparency and contribution.

Use cases

  • Secure app login
  • Biometric-based transaction confirmation
  • Protected data access
  • User identity verification
  • Two-factor authentication

Key features

  • Face ID support
  • Touch ID support
  • Fingerprint authentication
  • Cross-platform compatibility (Android, iOS, Windows)
  • Simple API integration

Suitable for

  • Apps requiring secure authentication
  • Financial or banking applications
  • Healthcare apps with privacy needs
  • Applications handling sensitive user data
  • Developers building secure mobile experiences

Considerations

  • Requires device support for biometrics
  • Limited to Android, iOS, and Windows platforms
  • May need fallback authentication methods
  • Permissions must be properly handled
  • Not suitable for non-biometric use cases

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

native_auth

With this pack you can use the biometrics systems of Android and IOS devices.


It will ask for the user which the biometric authentication method of his device, this can be FaceID or TouchID on IPhone or FingerPrint on Android phone

How to use

import 'package:native_auth/native_auth.dart';
final response = await Auth.isAuthenticate();
print(response.isAuthenticated); // true or false

response is an enum AuthResult containing the statuses:

error, auth and noAuth

auth means the user is authenticated.
noAuth means the user is no authenticated.
error means that it was not possible to request any biometrics.

📱Screenshots

🤖 Android

🍎 IOS

IOS Integration

Update your project's Info.plist file to include the FaceID permissions:

<key>NSFaceIDUsageDescription</key>
<string>Why is my app authenticating using face id?</string>

Android Integration

Update your project's AndroidManifest.xml file to include the USE_FINGERPRINT permissions:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.example.app">
  <uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<manifest>

Update your MainActivity.kt:

import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {
    // ...
}

OR

Update your MainActivity.java:

import io.flutter.embedding.android.FlutterFragmentActivity;

public class MainActivity extends FlutterFragmentActivity {
    // ...
}

to inherit FlutterActivity from FlutterFragmentActivity


Feito com ❤️ by Weliton Sousa

Categories

Dependencies

Dependency list 3 items

  • local_auth^2.1.6
  • local_auth_android^1.0.21
  • local_auth_ios^1.1.1

Source repository

Projects using this package

No data available yet.