useSession returns null for data in Next.js

Client side useSession form Better-Auth Client returns null:
  const { data, error, refetch, isPending } = useSession();
 console.log("SESSION DATA: ", data);
// logs SESSION DATA:  null

Have no idea why. Can someone help me to figure it out? Does anyone had such issue?
Solution
Are you sure the data isn't just pending? Because while it's pending you will get
null
.
Was this page helpful?