hasAuthenticationMethods method

Future<bool> hasAuthenticationMethods({
  1. GuardoService? guardoService,
})

Checks if any authentication methods are available on the device

This method performs a comprehensive check to determine if the device has any usable authentication methods (biometrics or device credentials).

Example usage:

if (await context.hasAuthenticationMethods()) {
  // Device has authentication methods available
  context.lockApp();
} else {
  // No authentication methods available
  // Skip authentication or show alternative UI
}

Implementation

Future<bool> hasAuthenticationMethods({GuardoService? guardoService}) async {
  final service = guardoService ?? _getGuardoService();
  return await service.hasAuthenticationMethods;
}