I have nuxtServerInit function and it should receive all users' browser data including cookies, but it does not receive the auth module (but not every time!) cookies (I'm talking about JWT Bearer token).
async nuxtServerInit(store, { req }) {
console.log(req.headers.cookie);
}
In the right case, it will show something like this:
i18n_redirected=en; auth.strategy=local; auth._token.local=Bearer%20eyJhbG*******
But in other browsers (edge for example), ONLY after browser restart, it will output this: i18n_redirected=en
. But then, if you update the site or open it in another tab it will be fine.
I can't understand WHY. It works so randomly... For example, in my main browser (chrome) it doesn't send the cookies every first time I launch (just as I said before), but then, when I just update the page it sends everything just fine. I tried to repeat this bug on purpose and it worked a few times and then stopped... But it works constantly in the Edge browser. Cookies are still there as they were before, but nuxt just don't receive them. I don't have some special cookies add-ons, everything works by its default options...
Is this some sort of a cache going on or what? Can someone help me with this, please.