Replies: 1 comment 2 replies
-
I have the same question, it seems that the recommended way is always to get the session via auth() on the server, at page level, and then pass it to the components, but that can be very tedious because of the prop drilling. Are we supposed to use something like zustand and keep the session there to provide global access? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone. Recently I noticed that in V5, the SesionProvider tooltip says we shouldn't / don't need to use it on the app router. This made me somewhat confused because in the docs, they say that the way to access the session on client components was to use the
useSession
hook. After some research, I found that some people were saying that the way to do it in V5 is to callauth()
on the server component, and pass it down to client if it needs it. But I am unsure. Is it correct to do it like that?I completely removed useSession from my app. In this PR:
dBianchii/kodix-turbo#40
So, what is the recomended way? Does the useSession support only exist now for
/pages
?Beta Was this translation helpful? Give feedback.
All reactions