useSession returns null for data in Next.js
Client side useSession form Better-Auth Client returns null:
Have no idea why. Can someone help me to figure it out? Does anyone had such issue?
Solution:Jump to solution
Are you sure the data isn't just pending? Because while it's pending you will get
null
.4 Replies
I set nextCookies plugin in BA Config as a last one in the array of plugins
And I import createAuthClient from the right place:
Could you help, please ? @Ping
Solution
Are you sure the data isn't just pending? Because while it's pending you will get
null
.How have you setup your auth.ts and auth-client? Are you sure you're logged in?
That's it. 🤦♂️ Thank you