【发布时间】:2020-10-31 12:01:30
【问题描述】:
我在向 auth/login 发出 POST 请求时收到此错误
[Nest] 8344 - 10/07/2020, 17:59:32 [ExceptionsHandler] Strategy#authenticate must be overridden by subclass +811577ms
错误:策略#authenticate 必须被子类覆盖 在 LocalStrategy.Strategy.authenticate (/home/damy/Projects/sn-ps/Typescript/simple-crud-with-nest/node_modules/passport-strategy/lib/strategy.js:21:9) 尝试(/home/damy/Projects/sn-ps/Typescript/simple-crud-with-nest/node_modules/passport/lib/middleware/authenticate.js:366:16) 在验证(/home/damy/Projects/sn-ps/Typescript/simple-crud-with-nest/node_modules/passport/lib/middleware/authenticate.js:367:7) 在/home/damy/Projects/sn-ps/Typescript/simple-crud-with-nest/node_modules/@nestjs/passport/dist/auth.guard.js:87:3 在新的承诺 () 在/home/damy/Projects/sn-ps/Typescript/simple-crud-with-nest/node_modules/@nestjs/passport/dist/auth.guard.js:79:83 在 MixinAuthGuard。 (/home/damy/Projects/sn-ps/Typescript/simple-crud-with-nest/node_modules/@nestjs/passport/dist/auth.guard.js:48:36) 在 Generator.next () 在/home/damy/Projects/sn-ps/Typescript/simple-crud-with-nest/node_modules/@nestjs/passport/dist/auth.guard.js:20:71 在新的 Promise ()
这是我的本地策略代码 nestjs local strategy code
【问题讨论】:
标签: javascript nestjs nestjs-passport