How can I make the user ID an auto-incrementing integer?
I have already seen the github issue related to this topic, but no information on how to actually do this and still get type safety is explained. I have already disabled generating ids in my config, but how can I get it to show up as a number and not a string? Here's my config (using nextjs):
6 Replies
Update: i ended up doing this at the moment, works for passing the User as props to a function, but the main functions aren't typed correctley still
feel free to open an issue on gh
Ok i will thank you
Still having this issue, no solution on github
GitHub
How can I make the user ID an auto-incrementing integer? · Issue #9...
Is this suited for github? Yes, this is suited for github To Reproduce Create a new nextjs app (create-next-app) Install drizzle-orm Install and setup better-auth using email & password, but ch...
what are the issues? make sure to set
advanced.generateId
to false
and you should be good in general.the id returned by the auth client in functions like getSession are still typed as string even though its an serial in the database
hello?