Love the simplicity. However, after I am successfully authenticated, my user session is not available inside my getServerSideProps function, so a 404 is always returned even after a successful authentication and redirect. Any thoughts on why:
const user = req.session.get("user");
would work in the sessions.js file but be unavailable in the getServerSideProps function?
Love the simplicity. However, after I am successfully authenticated, my user session is not available inside my getServerSideProps function, so a 404 is always returned even after a successful authentication and redirect. Any thoughts on why:
const user = req.session.get("user");
would work in the sessions.js file but be unavailable in the getServerSideProps function?
HI, @tsm012. How did you solve the above issue? I am experiencing the same issue.
Create a util in
utils/cookies.js
Implement lookup logic
Attempt to access the session value
At this point, the session is empty e.g
{ }
In my case, different
cookieNames
property.because i just copied and paste code above.