native_auth 1.0.6 copy "native_auth: ^1.0.6" to clipboard
native_auth: ^1.0.6 copied to clipboard

this package is to implement faceID, touchID and fingerprint authentication

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
copied to clipboard

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>
copied to clipboard

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>
copied to clipboard

Update your MainActivity.kt:

import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {
    // ...
}
copied to clipboard

OR

Update your MainActivity.java:

import io.flutter.embedding.android.FlutterFragmentActivity;

public class MainActivity extends FlutterFragmentActivity {
    // ...
}
copied to clipboard

to inherit FlutterActivity from FlutterFragmentActivity


Feito com ❤️ by Weliton Sousa

31
likes
150
points
139
downloads

Publisher

unverified uploader

Weekly Downloads

2024.10.02 - 2025.04.16

this package is to implement faceID, touchID and fingerprint authentication

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, local_auth, local_auth_android, local_auth_ios

More

Packages that depend on native_auth