mjhea0/passport-local-knex

Sessions don't appear to work

tobymurray opened this issue · 0 comments

I followed your article here (thanks for that!). Trying to get my own version going, I tried out your example. Logging in with an existing user doesn't appear to work so far as I can tell. Looking at the Passport docs, it holds the following:

If the built-in options are not sufficient for handling an authentication request, a custom callback can be provided to allow the application to handle success or failure.

The callback can use the arguments supplied to handle the authentication result as desired. Note that when using a custom callback, it becomes the application's responsibility to establish a session (by calling req.login()) and send a response.

I don't believe req.login() is being called on /auth/login