deleteUser method

Future<void> deleteUser(
  1. String id
)

Delete a user. Requires a service_role key.

id is the user id of the user you want to remove.

This function should only be called on a server. Never expose your service_role key on the client.

Implementation

Future<void> deleteUser(String id) async {
  final options = GotrueRequestOptions(headers: _headers);
  await _fetch.request(
    '$_url/admin/users/$id',
    RequestMethodType.delete,
    options: options,
  );
}