Delete a user.
deleteUser() method requires the user's ID, which maps to the auth.users.id column.shouldSoftDelete is true, the user is soft-deleted: their record and associated data are retained but the user is marked as deleted. Defaults to false, which permanently removes the user.ID of the user to be deleted.
If true, soft-deletes the user (keeps the record but marks it deleted). Defaults to false (permanent delete).
await supabase.auth.admin
.deleteUser('715ed5db-f090-4b8c-a067-640ecee36aa0');
await supabase.auth.admin
.deleteUser(
'715ed5db-f090-4b8c-a067-640ecee36aa0',
shouldSoftDelete: true,
);