I am facing an issue with storing a JWT token in Next.js 14. I want to load a page using SSR, but localStorage
is not supported in server-side components. My scenario is as follows: after logging in, the backend responds with a JWT token, which I currently store in localStorage
. However, localStorage
is not accessible in server-side components. How can I properly store the JWT token in this case.
I trying to using cookies to store it.