disable method

  1. @override
Future<AuthAccountState> disable(
  1. String userId, {
  2. String? reason,
  3. DateTime? now,
})
override

Disables the account.

Implementation

@override
Future<AuthAccountState> disable(
  String userId, {
  String? reason,
  DateTime? now,
}) async {
  final current = now ?? DateTime.now().toUtc();
  final existing =
      _states[userId.trim()] ?? AuthAccountState(userId: userId.trim());
  final updated = existing.copyWith(
    disabled: true,
    disabledReason: reason,
    disabledAt: current,
  );
  _states[userId.trim()] = updated;
  return updated;
}