Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout Callback #738

Open
cjbarth opened this issue Aug 8, 2019 · 1 comment
Open

Logout Callback #738

cjbarth opened this issue Aug 8, 2019 · 1 comment

Comments

@cjbarth
Copy link

cjbarth commented Aug 8, 2019

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
@sushiljainam-gt
Copy link

Only after passport@0.6.0 req.logout function takes callback in params. @cjbarth
refer #900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants