I'm using node/express.js
with cookie-session
in my application.
Currently, when a user logs in a cookie is stored in their browser with a value, for example: session: ABC123
. If the user logs out, the cookie is deleted. When the user logs back in, the same cookie and value are stored in the browser session: ABC123
.
I am getting the same session user_sid
whenever i login.
i want to randomize the session user_sid
every time the user logs in.
You want to call session.regenerate() when the user successfully login, that will do what you want and also address session fixation attack