Does getSession on the API folder work with getServerSideProps fetch request? #4335
Unanswered
markmendozadev
asked this question in
Help
Replies: 2 comments
-
Use this code in your _app.js :
|
Beta Was this translation helpful? Give feedback.
0 replies
-
@jaminecode Hello that's already how my _app.js looks like I wrapped it with the SessionProvider.
Not sure but I think if you make a request through the server-side the auth doesn't work. |
Beta Was this translation helpful? Give feedback.
0 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.
-
Question 💬
Does getSession on the API folder work with getServerSideProps fetch request?
How to reproduce ☕️
My api code
session is always NULL when i do a get request on getServerSideProps.
useEffect works perfectly though
/api/tasks
My serversideprops code
useEffect works perfectly though
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions