Using drizzle pglite with better-auth
Has anyone successfully used better-auth with drizzle-pglite?
6 Replies
I don't have a demo for you, but I'm sure other has.
I might be of help however, what issue are you facing?
ah i appreciate that, im currently using tanstack start so it could be an issue with that:
but i have the following drizzle-dev.config.ts:
i have the drizzle-prod.config.ts:
db.ts
what im noticing is the db is being updated, say a user signs up via google oauth, but the db isnt being updated so when i run a session check its null.
If i restart the dev server the db will have the user and pass the auth check
What do you mean by session check?
const session = await auth.api.getSession({ headers });
Gotcha.
Wait so when you restart your dev server, all of a suddden the DB has the userdata and when running getSession it all works?
yeah