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

User not logged-out when trying to log-in with incorrect password (BasicStrategy) #47

Open
emilis opened this issue Jul 2, 2015 · 0 comments

Comments

@emilis
Copy link

emilis commented Jul 2, 2015

Steps to reproduce:

  • have a route that requires BasicStrategy and uses session (e.g. /api/login),
  • have a second route (with no authenticate()) that outputs user information from request.user (from session), e.g.: /api/me.
  • log-in using the first route
  • check that you get user information from the second route
  • log-in with incorrect password using the first route
  • you get a 401 / Unauthorized status
  • check the second route: you still get user information from the second route.

Expected result:

  • User is logged-out and one does not get user information from the second route.

I am not sure if this is a bug of BasicStrategy or a "feature" of Passport.js, but I think users should be forcefully logged out when trying to double-login with incorrect credentials.

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

1 participant