You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The user has to login to access all the other pages
To achieve server side rendering for all the pages
All the api endpoint require tokens(token size ~4.7kb) to access the data, except login api
Prerequisite
After login the api will return a object { name: 'sam' location: 'San Jose, CA, USA' token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiw(~4.7kb token)' }
Issue
trying to store each value of the object in the cookie using cookies-js
but token value is not been stored in the cookie
But next js is not storing token into the cookie because it's size is more then 4kb
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
i was working with the next js project
Explanation
Prerequisite
{ name: 'sam' location: 'San Jose, CA, USA' token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiw(~4.7kb token)' }
Issue
But next js is not storing token into the cookie because it's size is more then 4kb
any alternative way to achieve this in next js
Beta Was this translation helpful? Give feedback.
All reactions