Set cookies in custom app

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
}, );


How about we try setting cookies using vanilla.js?

document.cookie = "username=John Doe; expires=Thu, 18 Dec 2025 12:00:00 UTC; path=/";

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.