I am new to backend. I was logging in using jwt for auth but have a problem. I am setting the cookie here but I can't see anything in the applications tab of chrome dev tools. However, I can still see the cookie in network tab. [using MERN stack]
app.post('/login', async (req, res) => {
const { email, password } = req.body;
const userDoc = await UserModel.findOne({ email });
try {
const passOk = await bcrypt.compare(password, userDoc.password);
if (passOk) {
var token = jwt.sign({ username: userDoc.username, id: userDoc.id }, privateKey);
console.log(token);
res.cookie('token', token);
res.status(200).json("Successfully signed up");
}
else {
res.status(404).json("Incorrect Credentials")
}
}
catch (err) {
res.status(404).json("Invalid Credentials")
}
})
Here is the network tab: (I don't know if it's safe to share the value fiels, so I blurred it)

But nothing is shown in applications tab:
There are 0 errors shown, the reponse I get is '200'. So, what is the problem?
