elvince
BABetter Auth
•Created by elvince on 4/3/2025 in #bug-reports
Admin plugin : listUsers total is not correct
Hi,
When using list users the total returned do not take into account the filter clause.
sample:
auth.api.listUsers({
headers: await headers(),
query: {
filterField: "role",
filterOperator: "eq",
filterValue: "admin",
limit: 1,
},
}),
You should have the total number of admin. As of today, we have the total of all users (admin and user role).
Issue on github : https://github.com/better-auth/better-auth/issues/21084 replies