Marcus
Marcus
BABetter Auth
Created by Marcus on 12/22/2024 in #help
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):
export const auth = betterAuth({
database: drizzleAdapter(db, { provider: "pg" }),
emailAndPassword: {
enabled: true,
},
plugins: [nextCookies()],
advanced: {
generateId: false,
},
});
export const auth = betterAuth({
database: drizzleAdapter(db, { provider: "pg" }),
emailAndPassword: {
enabled: true,
},
plugins: [nextCookies()],
advanced: {
generateId: false,
},
});
9 replies