Why Passport with Local Strategy is hanging on Authentication

If you are using custom callback for authentication using PassportjsĀ for Local Database Authentication, you may encounter the situation that the Post request hangs and the authentication never seems to end. There may be many reasons but what we’ve found most common is we are using passport.authenticate() middleware in a callback but do not provide (req, …