Passport and Passport Local req.isAuthenticated always returns false

前端 未结 2 1456
终归单人心
终归单人心 2020-12-31 23:34

I haven\'t been able to track this down, but for my set up, isAuthenticated always returns false even after a successful login. Here\'s the passport code:

2条回答
  •  自闭症患者
    2021-01-01 00:08

    I guess you forgot to put: req.login(...) inside passport.authenticate('local', function(...){}).

    See here (at the end of the page)

提交回复
热议问题