Replies: 2 comments 1 reply
-
I have no solution, just voicing I have the same problem. Any pages using getServersideProps, i do not get the session in middleware. |
Beta Was this translation helpful? Give feedback.
-
I'm facing the same problem. Api calls using getServerSideProps doesn't work, even following how indicated on documentation (https://next-auth.js.org/tutorials/securing-pages-and-api-routes#securing-api-routes). But works fine when the call is on client side. At first I thought it was a problem unique to my project but i clone the example project (https://github.com/nextauthjs/next-auth-example) and tried to do Api calls on getServerSideProps, but the same problem ocurrs. So if anyone got a solution please report it here. I will continue following the discussion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
I have an isuue with my api middleware. There is no session. I make an axios call in serverSideProps to my api. But there is no session in api.
this is my middleware. Middleware works when all the components mounted. But not in serverSideProps api call.
How to reproduce ☕️
I have an isuue with my api middleware. There is no session. I make an axios call in serverSideProps to my api. But there is no session in api.
this is my middleware. Middleware works when all the components mounted. But not in serverSideProps api call.
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions