Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

87
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!