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

114
Views
next-auth sessionToken not being passed as a HttpOnly cookie only on production

I'm creating a Next JS application (hosted on Netlify) and using next-auth to handle authentication. My backend api (uses Express) is hosted on Google App Engine. The HttpOnly cookies are being attached and sent while testing on localhost. However, while in production, the HttpOnly cookies are not being sent when fetching from the external backend api. I have been doing credentials: 'include' when trying to fetch from the frontend, and on my backend, I've whitelisted the correct urls.

Here's my corsConfig for my backend:

const corsConfig = {
  credentials: true,
  origin: function(origin, callback) {
    if (whitelist.indexOf(origin) === -1 || !origin) {
      let message = "The CORS policy for origin:" + origin + "is not configured";
      return callback(new Error(message), false);
    }
    return callback(null, true);
  },
};
app.use(cors(corsConfig));
about 4 years ago · Juan Pablo Isaza
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!