When regenerating session, don't copy the __tmp key

This commit is contained in:
Shane Kilkelly 2018-09-13 12:31:59 +01:00
parent c9e3418049
commit c95d925d56

View file

@ -44,7 +44,7 @@ module.exports = AuthenticationController =
return callback(err)
req.sessionStore.generate(req)
for key, value of oldSession
req.session[key] = value
req.session[key] = value unless key == '__tmp'
# copy to the old `session.user` location, for backward-comptability
req.session.user = req.session.passport.user
req.session.save (err) ->