diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart index cb30c56f..d02e5f12 100644 --- a/lib/pages/qr_code_page/qr_code_page_widget.dart +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -324,8 +324,9 @@ class _QrCodePageWidgetState extends State with TickerProvider Future _showBiometricsAuth(BuildContext context) async { await BiometricHelper.checkBiometrics() .then((value) async => await BiometricHelper.authenticateBiometric().then((value) async { - final key = - await StorageHelper().get(SecureStorageKey.fingerprintPass.value, Storage.SecureStorage) ?? ''; + if (value == false) throw Exception('Biometric authentication failed'); + final key = await StorageHelper().get(SecureStorageKey.fingerprintPass.value, Storage.SecureStorage); + if (key == null || key.isEmpty) throw Exception('No key found'); safeSetState(() { if (animationsMap['barcodeOnActionTriggerAnimation'] != null) { animationsMap['barcodeOnActionTriggerAnimation']!.controller.stop();