FLUTTER ECOSYSTEM

welitonsousa/native_auth

이 패키지를 사용하면 Android 및 iOS 기기의 생체 인식 시스템을 사용할 수 있습니다.

native_auth 프로젝트 이미지
Stars
8
Forks
3
최근 푸시(UTC)
2023. 4. 12.
프로젝트 상태
활성
Weliton Sousa GitHub avatar
GITHUB User

Weliton Sousa ↗

Sou desenvolvedor apaixonado por descobrir novas tecnologias. Gosto principalmente do desenvolvimento mobile, mas as tecs web e backend estão em dia 😉

FastzapPicos Piauí
언어DartSwiftKotlinObjective-C

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 6 개
  • local_auth^2.1.6
  • local_auth_ios^1.1.1
  • local_auth_android^1.0.21
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^2.0.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

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

https://gitlab.com/welitonsousa/images/-/raw/main/android-waiting.png https://gitlab.com/welitonsousa/images/-/raw/main/android-success.png

🍎 IOS

https://gitlab.com/welitonsousa/images/-/raw/main/ios-waiting.png https://gitlab.com/welitonsousa/images/-/raw/main/ios-success.png

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