Simplify biometric enable - user just logged in, no need to verify again
This commit is contained in:
parent
999f9691ae
commit
257cc8e802
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue