Failed to create verification

I am trying authentication for the first time with BetterAuth and am running into the following error:
Failed to create verification: null value in column "id" of relation "verification" violates not-null constraint
Failed to create verification: null value in column "id" of relation "verification" violates not-null constraint
Does this ring any bells for something obvious I have done wrong? Just an FYI, I am using Elysia on my backend with Typeorm, and react as my frontend using the Better Auth client.
1 Reply
captbunzo
captbunzoOP3h ago
I found the root of this issue. It looks like generateId is being defaulted to false in the better-auth typeorm package. I fixed this by adding the following to my config:
advanced: {
database: {
generateId: () => crypto.randomUUID(),
},
},
advanced: {
database: {
generateId: () => crypto.randomUUID(),
},
},

Did you find this page helpful?