Next.js [Admin] [Username] listUsers() returns UserWithRole[] missing property `username`
I'm using two plugins, Admin and Username.
I'm currently building my admin dashboard and I'm listing all users in a server action like this:
This works but returns the data with the type
UserWithRole[]
and is missing property username
I read something about infering types, but I don't know if that's the right way.
I would appreciate any help. ty4 Replies
whats the auth config look like
now i dont know if it is the case but try changing up the order of your plugins, since i know for nextCookies it needs to be the last plugin according to the docs so you could try putting username plugin before admin plugin
Next.js integration | Better Auth
Integrate Better Auth with Next.js.
thanks for the reply,
i tried switching them up, but it still doesn't work here is the
UserWithRole
if it helps
I dont know alot about better auth was just a idea
@bekacru will know