Facing a weird intermittent issue that's blocking our signups
Using "better-auth": "^1.2.9"/Next.js and Postgres.
Have GitHub/Google Signups. When user is new on platform and tries to sign it, it says the error given in the photo. But when you go back. close tab, again open app, refresh and signup, then it signin without any issue.
The api logs says:
But the thing is all the tables are present. and fact that its sometimes signing in without any issue. means this is not a table issue.
Can anyone help with this? the webapp is here https://chaitea.chat - if you want to check it.
Only happens when user is new

3 Replies
Can you share me your auth config?
yeah can you send auth.ts
@Ping @nikatune
i think i just found out. it was something to do with postgres table schema not being picked right by betterauth as i am having tables in different schema which is not public. i was setting it in pg file itself which was causing some race conditions. have done some changes of hardcoding schema searchpath on db side, its working now i think. checking with few new signups and see if i see that issue again, i'll notify. can you signup and see if you are getting that issue?
i think its should be working now. i did that change in db itself as there is no way to specify schema of tables to be used in betterauth. it would be a great help if we can get a property to specify what schema under which postgres tables are present, as by default it picks public schema only.
auth.ts