1

我是新手nodeJs,我passport authentication通过谷歌使用并收到错误。我已经在不同的模块中编写了我的代码。在发布之前,我已经阅读了 Jared Hanson 的回复..并将验证回调作为策略构造函数的参数写入,但仍然出现错误。

Error: no strategy registered under name: google
    at attempt (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\passport\lib\passport\middleware\authenticate.js:237:37)
    at Passport.authenticate (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\passport\lib\passport\middleware\authenticate.js:244:7)
    at callbacks (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\express\lib\router\index.js:161:37)
    at param (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\express\lib\router\index.js:135:11)
    at pass (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\express\lib\router\index.js:142:5)
    at Router._dispatch (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\express\lib\router\index.js:170:5)
    at Object.router (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\express\lib\router\index.js:33:10)
    at Context.next (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\express\node_modules\connect\lib\proto.js:190:15)
    at Context.actions.pass (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\passport\lib\passport\context\http\actions.js:77:8)
    at SessionStrategy.authenticate (C:\Users\nidhish\Documents\GitHub\KinoCards\node_modules\passport\lib\passport\strategies\session.js:67:10)
4

0 回答 0