issue getting session using mongodb
the login buttons work and i looking at the collection on mongodb it was able to insert the data, but when i try to check for a session on
/dashboard
using:
i get the following error:
17 Replies
tried turning on
advanced.generateId
to false
could you share your schema and your auth config
i dont have a custom schema
if you're using mongodb adapter don't disable generateID
i get the error both with or without the generateid
anything else i could try?
by any chance do you already have data in your db?
i mean the login buttons work and adds the information to the db but then when it does the call back to /dashboard i get the internal server error
and any future reloads with any data in the db
and session cookie
so getSession is failing?
yes
could you try to reset the db and check if it works?
new db?
yeah sure
yeah. invlaid id is thrown from better auth when the id couldnt be converted to string or back to ObjectId
tried on a new db and same issue

data gets added into db though

wtf i fixed it?
okay so idk why but turning off
--turbo
on nextjs
workedI lost a week of my life until the problem was solved :pepe_cry:
You saved my life :peepoLove:
😭😭 I feel you ❤️