diff --git a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee index 81aa83f88c..164068e89a 100644 --- a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee +++ b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee @@ -46,6 +46,8 @@ module.exports = AuthenticationController = req.sessionStore.generate(req) for key, value of oldSession req.session[key] = value + # copy to the old `session.user` location, for backward-comptability + req.session.user = req.session.passport.user req.session.save (err) -> if err? logger.err {user_id: user._id}, "error saving regenerated session after login"