diff --git a/CHANGELOG.md b/CHANGELOG.md index 12a5c7a3..c954453b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ This changelog follows Semantic Versioning https://semver.org/ +# 3.0.1 (2019-07-13) + +### Patch + +* Fixed premature redirect in logOut #20 @rwky + # 3.0.0 (UNRELEASED) ### Major diff --git a/lib/http/request.js b/lib/http/request.js index 0f26c754..973b3a01 100644 --- a/lib/http/request.js +++ b/lib/http/request.js @@ -67,10 +67,11 @@ req.login = req.logIn; /** * Terminate an existing login session. + * @param {GenericCallback} done * @returns {void} * @public */ -req.logOut = function logOut() { +req.logOut = function logOut(done) { let property = 'user'; if (this._passport && this._passport.instance) { property = this._passport.instance._userProperty || 'user'; @@ -78,7 +79,7 @@ req.logOut = function logOut() { this[property] = null; if (this._passport) { - this._passport.instance._sm.logOut(this); + this._passport.instance._sm.logOut(this, done); } }; diff --git a/package.json b/package.json index 12868c73..0cb4733e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@passport-next/passport", - "version": "3.0.0", + "version": "3.0.1", "description": "Simple, unobtrusive authentication for Node.js.", "author": { "name": "Passport Next Developers",