You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the server side, **this is still available to use**, however, we recommend using `getServerSession` going forward. The idea behind this is to avoid an additional unnecessary `fetch` call on the server side. For more information, please check out [this issue](https://github.com/nextauthjs/next-auth/issues/1535).
Is there any context that might help us understand?
When using getSession() on the server side with POST request, it returns null as described here. #7167
Does the docs page already exist? Please link to it.
On the server side, **this is still available to use**, however, we recommend using `getServerSession` going forward. The idea behind this is to avoid an additional unnecessary `fetch` call on the server side. For more information, please check out [this issue](https://github.com/nextauthjs/next-auth/issues/1535).
The text was updated successfully, but these errors were encountered:
clueleaf
added
docs
Relates to documentation
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Apr 8, 2023
If possible, I would like to continue using useSession on the server side.
I have already used it in many places, and for now, the overhead of making fetch requests each time is not a big concern for me.
We will deprecate/stop recommending getSession server-side, as it is inefficient and can cause issues/misunderstandings. You should always use getServerSession instead.
@balazsorban44
I understand we should use getServerSession on the server side, but this issue is about documentation.
Because getSession doesn't work at all in some cases, I think the document should not be On the server side, **this is still available to use**.
What is the improvement or update you wish to see?
Since I faced a situation where
getSession()
doesn't work properly on the server side, I think this part of doc should be fixed.next-auth/docs/docs/getting-started/client.md
Line 287 in d69f311
Is there any context that might help us understand?
When using
getSession()
on the server side with POST request, it returnsnull
as described here.#7167
Does the docs page already exist? Please link to it.
next-auth/docs/docs/getting-started/client.md
Line 287 in d69f311
The text was updated successfully, but these errors were encountered: