why getServerSession returns null when I fetch data from server(page.jsx) in nextjs? #12639
Unanswered
thehadikarimi
asked this question in
Help
Replies: 0 comments
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.
-
Hello.
I use next-auth 4.24.11 in my nextjs(app-router) project 15.1.3. I realized that when I send request from server component(page.jsx) to api route, getServerSession returs null but when I send request from client component, there is no problem.
here is my page.jsx code
and this is my route.js code
and this is a client component code
Beta Was this translation helpful? Give feedback.
All reactions