login-plus 1.6.3 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/login-plus.js CHANGED
@@ -216,9 +216,11 @@ loginPlus.Manager.prototype.init = function init(app,opts){
216
216
  }
217
217
  });
218
218
  app.get(opts.baseUrl+opts.logoutUrlPath, function(req,res,next){
219
- req.logout();
220
- req.session.returnTo = null;
221
- res.redirect(opts.redirBaseUrl+opts.logoutRedirect);
219
+ req.logout(function(err) {
220
+ if (err) { return next(err); }
221
+ req.session.returnTo = null;
222
+ res.redirect(opts.redirBaseUrl+opts.logoutRedirect);
223
+ });
222
224
  });
223
225
  if(!opts.skipCheckAlreadyLoggedIn){
224
226
  checkAlreadyLoggedIn(app, opts);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "login-plus",
3
3
  "description": "login service for express",
4
- "version": "1.6.3",
4
+ "version": "1.7.0",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/login-plus",