https://github.com/boraxpr/boraxpr_biometric_example
An example app demonstrates a using of local_auth library to enable application "Biometric" Authentication.
https://github.com/boraxpr/boraxpr_biometric_example
Last synced: about 1 year ago
JSON representation
An example app demonstrates a using of local_auth library to enable application "Biometric" Authentication.
- Host: GitHub
- URL: https://github.com/boraxpr/boraxpr_biometric_example
- Owner: boraxpr
- Created: 2023-10-06T08:00:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-06T11:22:56.000Z (over 2 years ago)
- Last Synced: 2025-04-01T11:22:26.365Z (about 1 year ago)
- Language: Ruby
- Size: 249 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# boraxpr_biometric_example
This Flutter project showcases the implementation of biometric authentication using local_auth.
## Table of Contents
- [Permission Setup](#permission-for-biometric)
- [Android](#android-at-projectandroidappsrcmainandroidmanifestxml-directly-under-manifest-tag)
- [iOS](#ios-at-projectiosrunnerinfoplist-directly-under-dict-tag)
- [Android-Specific Configurations](#android-specific-configurations)
- [iOS-Specific Configurations](#ios-specific-configurations)
- [Adding the local_auth Dependency](#add-the-local_auth-dependency)
### Permission for biometric
If permission is not granted, app will be failed to initialize.
#### Android at `project/android/app/src/main/AndroidManifest.xml` directly under "manifest" tag.
``````
#### IOS at `project/ios/Runner/Info.plist` directly under "dict" tag.
```
NSFaceIDUsageDescription
Why is my app authenticating using face id?
```
### Android specific configurations
At `project/android/app/src/main/kotlin/com/example/{ProjectName}/MainActivity.kt` change the default Activity to use FlutterFragmentActivity.
```
import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() {
// ...
}
```
### iOS specific configurations
Xcode build will requires you to select your team. To do this, you need to be on MacOS. Then open `project/ios/Runner.xcworkspace` by using Xcode then edit the build setting.
### Add the local_auth dependency
```
dependencies:
flutter:
sdk: flutter
local_auth:
```
### Run
`flutter pub get`
`flutter run`