Hi I’m creating a custom app for Freshdesk.
My app does a request API Call to my backend (express server) and the backend sends a cookie with a JWT token.
That cookie is sent with the flags, httpOnly, secure, and samesite=none.
That cookie is never set in my browser not in development mode nor in production.
I just want to set a cookie it shouldn’t be impossible.
I also tried setting the cookie from the client side just to see if I could and it didn’t set it either.
Server side snippet:
//All imports required
app.get(“/validate-account”, async (req, res) => {
//other code
res.cookie(“test”, “value”, {
maxAge: 3600000,
sameSite: “none”,
secure: true,
});
}
}
Client-side snippet:
import Cookies from “js-cookie”;
const Home = (props) => {
useEffect(() => {
Cookies.set(“name”, “valueGB”, { expires: 1 / 24 }); // Expires in 1 hour
}, );
etc…
}