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

116
Vistas
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
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