nodes passport Error: Unknown authentication strategy “local-login”

后端 未结 2 1405
别跟我提以往
别跟我提以往 2021-01-14 19:22

I have been trying to get local authentication work with passport on nodejs and as far as i can tell all of my code it is correct but i keep getting the same annoying error

2条回答
  •  清酒与你
    2021-01-14 19:53

    I also had the same problem but when I put this line of code after the app.use(flash()) it worked:

    app.use(passport.initialize());
    app.use(passport.session());
    app.use(flash());
    require('./config/passport')(passport);
    

提交回复
热议问题