3 Replies
Look at this comment:
Source: https://github.com/better-auth/better-auth/blob/canary/packages/core/src/db/schema/user.ts
GitHub
better-auth/packages/core/src/db/schema/user.ts at canary · better...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
mmh not sure how that helps me? Even if I fix the User type all the typings of methods like
auth.api.updateUser would still be broken
For now I found a workaround creating a custom plugin:
this fixes type inference, but it requires that weird duplicated typeYes, I think that's the only way for now, until they implement the additionalFields in the zod schema
