JSESSION is disappearing each reload

Tech Pass4 months ago

Hello am using post session using demo4.traccar.org when i try to login using this api cookies appears as yellow and said that sameSiteName not declared so I can't also get the session its because of CORS problems but how can I fix when I tried on localhost everything done in right way but the problem that am using the demo server to connect to traccar client app to see device positions and direction here is my code Thanks in advance

const login = async () => {
    try {
      const data = qs.stringify({
        email: "***",
        password: "***",
      });

      const response = await axios.post(
        "https://demo4.traccar.org/api/session",
        data,

        {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
          withCredentials: true,
        }
      );

      if (response.status === 200) {
        console.log("Login successful:", response.data);
      }
    } catch (error) {
      console.error("Login error:", error);
    }
  };