Replies: 1 comment
-
You'll likely need to persist the auth in a cookie. Check out next-iron-session. |
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.
-
I am able to login the user and persist his session using the express-session package. Now the issue I am facing is when I navigate from page X to page Y how am I supposed to know if the session is still active since request, response parameters are available in getInitialProps only on the first load (custom server). I am however able to find if the session is active on the server when APIs are beginning called and can return a 403 back to the client. Also, I am using redux which is difficult with Next Js cause I am not able to figure out how to persist data on the client?
Beta Was this translation helpful? Give feedback.
All reactions