Node.js user authentication using passport
问题 (updated code with serialization functions - still redirects to /failedRedirect) I'm trying to get simple username/password authentication going using the passport package, but failing. In the example below I've tried to verify that authentication works by basically always returning a valid authentication (regardless of what gets passed), but for some reason it fails and passport redirects to the failed login link. If anybody could help me out in figuring out how to get this example to simply