mfaFactors function

  1. @riverpod
Future<List<Factor>> mfaFactors(
  1. Ref<Object?> ref
)

Lists all verified TOTP factors for the current user.

Implementation

@riverpod
Future<List<Factor>> mfaFactors(Ref ref) async {
  final response = await Supabase.instance.client.auth.mfa.listFactors();
  return response.totp.where((f) => f.status == FactorStatus.verified).toList();
}