andreizanik / cookies-next

Getting, setting and removing cookies on both client and server with next.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cookie doesn't getting saved

mohit-kumar-singh55 opened this issue · comments

Hello, I'm currently trying to set a cookie with key 'token' as:

export const setToken = (token = '') => {
    setCookie("token", token, { maxAge: 60 * 60 * 24 * 100 });
};

I checked until yesterday, and this 'token' cookie was being saved in the browser, but when I tried to access the website today, I discovered that the cookie was not being saved, no matter how many times I tried, and even I had not made any modifications.

Closing this issue as I found that 'token' was exceeded the size limit of cookie.