Skip to content

Commit

Permalink
hot fix to persist app.locals.user variable, when persistent storage …
Browse files Browse the repository at this point in the history
…is in place and auth does not repeat on server restart bump version
  • Loading branch information
hdngr committed Nov 4, 2015
1 parent e4f14d9 commit 0552068
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Strategy {
middleware(req, res, next) {
if (!this.passport) {
if(req.session.isLoggedIn) {
req.app.locals.user = req.session.user;
return next();
};
if(req.method === 'POST' && req.path === ('/login' || '/logout')) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sriracha-admin",
"version": "0.0.1",
"version": "0.0.2",
"description": "An admin middleware for mongoose and express.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 0552068

Please sign in to comment.