passport local strategy not getting called

前端 未结 14 784
夕颜
夕颜 2020-12-13 04:31

I\'m sure I\'m missing something really obvious here, but I can\'t figure this out. The function I\'ve passed to the LocalStrategy constructor doesn\'t get called when the l

14条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 04:59

    For Express 4.x:

    // Body parser
    var bodyParser = require('body-parser');
    
    app.use(bodyParser.urlencoded({ extended: false })) // parse application/x-www-form-urlencoded
    app.use(bodyParser.json()) // parse application/json
    

    c.f. https://github.com/expressjs/body-parser

提交回复
热议问题