ios faceid issue

merge-requests/322/head
Sultan Khan 4 years ago
parent 449540504c
commit 63d73b60e1

@ -25,7 +25,9 @@
<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>
<key>NSFaceIDUsageDescription</key>
<string>Why is my app authenticating using face id?</string>
<string>We are using it for authentication</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/models/auth/send_activation_code_model2.dart'
import 'package:doctor_app_flutter/models/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/otp/sms-popup.dart';
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
@ -17,6 +18,7 @@ import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:intl/intl.dart';
import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.dart';
@ -233,7 +235,8 @@ class _VerificationMethodsState extends State<VerificationMethods> {
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(3, true, authProv)
authenticateUser(3,
true, authProv)
},
child: getButton(
user.logInTypeID,
@ -483,9 +486,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
return InkWell(
onTap: () => {
if (checkIfBiometricAvailable(BiometricType.fingerprint))
{
authenticateUser(3, true, authProv)
}
{authenticateUser(3, true, authProv)}
},
child: RoundedContainer(
backgroundColor:
@ -703,10 +704,23 @@ class _VerificationMethodsState extends State<VerificationMethods> {
loginWithFingurePrintFace(type, isActive, authProv) async {
if (isActive) {
// this.startBiometricLoginIfAvailable();
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Scan your fingerprint to authenticate',
useErrorDialogs: true,
stickyAuth: true);
const iosStrings = const IOSAuthMessages(
cancelButton: 'cancel',
goToSettingsButton: 'settings',
goToSettingsDescription: 'Please set up your Touch ID.',
lockOut: 'Please reenable your Touch ID');
try {
authenticated = await auth.authenticateWithBiometrics(
localizedReason: 'Scan your fingerprint to authenticate',
useErrorDialogs: true,
stickyAuth: true,
iOSAuthStrings: iosStrings);
} on PlatformException catch (e) {
DrAppToastMsg.showErrorToast(e);
}
if (!mounted) return;
if (user != null && (user.logInTypeID == 3 || user.logInTypeID == 4)) {
this.sendActivationCode(type, authProv);
// this.checkActivationCode(authProv);

Loading…
Cancel
Save