I have a next js app that is server side rendered and I am trying to implement authentication using JWT token.
However, I get the following error when I try to read the cookie from the client cookie:
Warning: Did not expect server HTML to contain a <header> in <div>.
at div
...error stack
This is the code I am running when the root route renders in my app:
const cookies = Cookie.getCookie() // {jwt_teken: 'token'};
const isUserAuthenticated = !!cookies.jwt_token;