Simplify biometric enable - user just logged in, no need to verify again

This commit is contained in:
Johan Jongsma 2026-02-01 21:04:27 +00:00
parent 999f9691ae
commit 257cc8e802
1 changed files with 4 additions and 16 deletions

View File

@ -156,22 +156,10 @@ class AuthService extends ChangeNotifier {
}
/// Enable biometric authentication for future logins
Future<bool> enableBiometric() async {
// Reset auth state so we actually prompt the user
_biometricService.resetAuthState();
// Now verify user can authenticate
final result = await _biometricService.authenticate(
reason: 'Verify your identity to enable biometric login',
);
if (result == BiometricResult.success) {
await _biometricService.setBiometricEnabled(true);
await completeBiometricSetup();
return true;
}
return false;
Future<void> enableBiometric() async {
// User just logged in - no need to verify again, just enable
await _biometricService.setBiometricEnabled(true);
await completeBiometricSetup();
}
/// Skip biometric setup