Kinan
BABetter Auth
•Created by Kinan on 5/22/2025 in #help
CORS "preflight response did not succeed" issue

4 replies
BABetter Auth
•Created by Kinan on 5/4/2025 in #help
How to configure custom ID column names (e.g., id_user, id_session) ?
Hello everyone,
I'm trying to customize the ID column names in my database schema. By default, better-auth uses
id
for the user table, id
for the session table, etc. I'd like to use id_user
, id_session
, etc., instead.
I attempted to configure this in the auth.ts
file like this :
However, I'm getting the following TypeScript error on the id_user: "id_user"
line:
It seems the fields
property only allows mapping predefined fields like name
, email
, etc., but not the id
field itself.
Is it possible to configure better-auth to use custom ID column names like id_user
?
Thanks in advance for your help!1 replies