'The Browser is not displaying cookies in storage section But everything works fine
I have backend in NodeJS deployed to Heroku and Frontend in NextJs deployed to Vercel.
On login route, I am sending a secure httpOnly cookie to the client. The browser saves the cookie but does not show it in the storage section/application menu in DevTools of the browser.
here you can see the in the response to login request the cookies is received but when I open the storage section using DevTools it's not there.
res.status(200).cookie("token", token, {
maxAge:3000,
httpOnly: true,
sameSite: "none",
secure: process.env?.NODE_ENV === "production",
path: "/",
}).json({msg:"success"})
But when I check if the user is authenticated it works fine as expected. The main problem is to display the cookie in the Storage/Application tab in the DevTools of the browser. On the localhost the cookies are displayed in DevTools, but in production it does not show the cookies
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

