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

349
Vistas
AdonisJS auth and session

According to the documentation :

You can logout the user by calling the auth.logout method. It will destroy the user login session and the remember me cookie. The remember me token inside the users is also set to null.

docs.adonisjs.com

AuthController.ts

  public async logout({ response, auth, session }: HttpContextContract) {
    await auth.logout()
    session.flash({ success: 'You are now logged out.' })
    return response.redirect().toRoute('login')
  }

But the remember me token in the users table is not set to null and when I log back in, the remember me token is still the same. It looks like my app is working fine. Why is that ? Is this the default behavior?

Actually, I don't understand how sessions work in AdonisJS.

Cookies in Chrome

On the first request I get the first two cookies and when I log in by checking the remember me checkbox, the last cookie appears. The first one seems to be the session id. adonis-session cookie also contains the session id. So what is the first used for and what does it contain? And what does the remember_web cookie contain?

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