From 6a60ea2ee2ca614eee074fd9e3d83cf607118f21 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Tue, 29 Apr 2025 09:51:30 +0200 Subject: [PATCH] fix auth check --- .../authentication/biometric_check.dart | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/Frontend/lib/mih_packages/authentication/biometric_check.dart b/Frontend/lib/mih_packages/authentication/biometric_check.dart index 272dbceb..e4f2777e 100644 --- a/Frontend/lib/mih_packages/authentication/biometric_check.dart +++ b/Frontend/lib/mih_packages/authentication/biometric_check.dart @@ -91,34 +91,18 @@ class _BiometricCheckState extends State { setState(() { _isBioAuthenticated = true; }); + } else { + authErrorPopUp(); } // print("Authenticated: $didBioAuth"); } catch (error) { print("Auth Error: $error"); authErrorPopUp(); } + } else { + print("Auth Error: No Biometrics Available"); + authErrorPopUp(); } - // else { - // showDialog( - // context: context, - // builder: (context) { - // return MihAppAlert( - // alertIcon: Icon( - // Icons.warning, - // color: MzanziInnovationHub.of(context)!.theme.errorColor(), - // ), - // alertTitle: "Biometric Error", - // alertBody: Text( - // "Auth not allowed", - // style: TextStyle( - // color: MzanziInnovationHub.of(context)!.theme.errorColor(), - // ), - // ), - // alertColour: MzanziInnovationHub.of(context)!.theme.errorColor(), - // ); - // }, - // ); - // } } void authErrorPopUp() {