Answer the question
In order to leave comments, you need to log in
Why doesn't js-cookies see cookies in the browser?
A question. There is a login route, I go there, set up a new session, a new cookie is written to the browser. Then in react in router I try to take this cookie with js-cookies:
function isLogged() {
const cookie = Cookies.get("connect.sid");
console.log(cookie);
if (!cookie) {
return 0;
}
return 1;
}
app.use(
cors({
credentials: true,
origin: "http://localhost:3000",
optionsSuccessStatus: 200
})
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question