passport local strategy not getting called

前端 未结 14 805
夕颜
夕颜 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条回答
  •  旧时难觅i
    2020-12-13 05:02

    For me everything was setup properly.. The issue was that I was collecting form data and then creating a json from form data and send it like JSON.stringify(formdatajson) to server. (For me login form was a popup on screen)

    I Found my mistake by debugging passportjs...

    If you also have same problem and none of the above solution seems working for you then debug passportjs.

    open

    strategy.js
    

    put debugger in below method.

    Strategy.prototype.authenticate 
    

    Check what form data is coming for you. Hope this help ...

提交回复
热议问题