User Session in SSR (Next.js)

I have a separate backend in Nest.js, and I am using Next.js for the frontend. I want to fetch the user session and user details in SSR, but when I do authClient.getSession(), it returns {data: null}, but it works fine in client side.

I have read other posts as well, but I didn't understand.
Was this page helpful?