Additional fields missing from User type
I have added 2 additional fields to better auth with this code:
i'm working only server side, is there something like type Session = typeof auth.$Infer.Session for the User type?
4 Replies
yeah refer to this - https://www.better-auth.com/docs/concepts/typescript#additional-fields
TypeScript | Better Auth
Better Auth TypeScript integration.
i'm working on server side so i don't use "createAuthClient" but i use auth directly, which i think should be faster beacuse it shouldn't make any http request since i'm on the server already.
there is a server one right below to it