I'm reading through the code debugging an issue and I note that in request.js the req.logOut function calls this._passport.instance._sm.logOut(this), which can take a callback parameter, but none is passed. Granted, I'm sure this is because req.logOut doesn't take any arguments, but that seems like a failure.
A passport strategy's logout may require async tasks to be completed (the case I'm debugging) or otherwise have use for a callback function. Shouldn't req.logOut take a callback argument and then pass it to this._passport.instance._sm.logOut, which already has logic to call it?
Expected behavior
I would expect a way to get a callback called after being logged out.
Actual behavior
A callback can't be provided, and thus isn't called.
Steps to reproduce
req.logOut(function () { console.log('Done logging out.'); });
Environment
- Operating System:
- Node version: v10.16.0
- passport version: passport@0.4.0
I'm reading through the code debugging an issue and I note that in
request.jsthereq.logOutfunction callsthis._passport.instance._sm.logOut(this), which can take a callback parameter, but none is passed. Granted, I'm sure this is becausereq.logOutdoesn't take any arguments, but that seems like a failure.A passport strategy's logout may require async tasks to be completed (the case I'm debugging) or otherwise have use for a callback function. Shouldn't
req.logOuttake a callback argument and then pass it tothis._passport.instance._sm.logOut, which already has logic to call it?Expected behavior
I would expect a way to get a callback called after being logged out.
Actual behavior
A callback can't be provided, and thus isn't called.
Steps to reproduce
Environment