Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

88
Vistas
is it possible for a cookie to be deleted by itself?

I have this website that uses react, django Its an ecommerce so once they want to pay for the product all off the cookies being deleted

what happens behind the scenes is once they place an order it will generate an transactionId when user click the Pay now button to pay the order they will go to another website to place their credit card and pay then that transactionId will be stored in the cookies to verify, see if the order is payed or not if it is payed then it will make the order as a payed order for the user

The problem is once they go for placing their credit card on another website all of the cookies of my website being cleared

what is the problem

Here is a example of my cookie

setCookie("transId", `${orderId}`, {
      path: "/",
      expires: new Date(new Date().valueOf() + 1000 * 60 * 60 * 1000),
      sameSite: "lax",
      secure: true,
    });

this setCookie is coming from react-cookie package

can you see where is my problem ? is it because cookie is not httpOnly or something else is the problem

I realy need your help :))

thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you have to provide the domain also in my case

  const SITE_ROUTE = process.env.SITE || 'localhost';
  res.cookie('authentication', token, {
    maxAge: 900 * 900000,
    httpOnly: false,
    domain: SITE_ROUTE,
  });

Site in env is admin.goq.com

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda