kevin8426
TTCTheo's Typesafe Cult
•Created by rykuno on 5/7/2023 in #questions
Next-Auth Session in Server Function
Hey Guys, I found this thread through search and thought I'd chime in: There is currently no official fix for this but there is a workaround for the time being:
Wrap your client component in a server component. Import the server function in a server component and pass it as a prop to the client component and call it there. That works but is more boilerplate than I would like.
Like this:
Now using cookies or headers from
next/headers
works fine.29 replies