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

199
Vistas
node js session doesn't persist if the client is on a different domain

I have a server node js and a client vue js.

The client can be called from 2 domains. example:

client.domain1.de

client.domain2.de

The server is available in the same domain as one of the clients. example:

server.domain1.de

In the node js application, I have Express using middleware session and I store login information on the session.

If I call the server from the domain1 the same domain client and server it stores just fine.

if I called the server from a different domain domain2 the session is not stored.

the session is configured in such way:

export default session({
  store: new RedisStore({ client: redisClient }),
  secret: my-secret,
  saveUninitialized: false,
  resave: false,
  name: my name,
  cookie: {
    secure: true, 
    httpOnly: true,
    maxAge: my age,
    sameSite: 'lax',
  },
});

Note that I am not talking about the cookie but instead extra session variable

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