Answer the question
In order to leave comments, you need to log in
Why are cookies not saved on the client after deployment?
Please tell me, there is authorization on the site, after a successful login, cookies with a token are saved on the client, everything worked on the localhost, the cookies were saved, but after the deployment, the authorization is successful, but the cookies are not saved on the client.
import * as cookieParser from "cookie-parser";
app.use(cookieParser());
app.enableCors({ origin: "url сайта", credentials: true });
response.cookie("token", token, { httpOnly: true });
Answer the question
In order to leave comments, you need to log in
The domain is probably not the same. Look in the HTTP headers for specific cookies.
Still there is a variant that lifetime is incorrectly specified.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question