session icon indicating copy to clipboard operation
session copied to clipboard

Feature request: Renew session id

Open wdetac opened this issue 8 years ago • 2 comments

My goal is to change session id but make every other remain unchanged. I think session.regenerate() will be useful. But it will destroy and re-create the session instance.

req.session.regenerate(function(err) {
    // will have a new session here
})

Can we have something like that?

req.session.regenerate(preserveData = false, function(err) {
    // will have a new session here
    // if preserveData set to true, preserve session data
})

wdetac avatar Mar 08 '18 04:03 wdetac

Definately something that has been on the docket, I believe. Duplicate of #425 I think. If you don't think this is a duplicate of that issue, I may be misunderstanding the feature request, I apologise!

dougwilson avatar Mar 08 '18 04:03 dougwilson

That one exactly what I mean, I missed that sorry.

wdetac avatar Mar 08 '18 04:03 wdetac