Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

115
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda