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.
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.
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?