liangyali/passport-wechat

Is it a false report for error 'passport.initialize() middleware not in use'

Opened this issue · 7 comments

While I integrate feathers oauth2 with this passport-wechat, and visit http://localhost:3035/auth/wechat I got error 'passport.initialize() middleware not in use'.
I check this error is from line 56 in passport-wechat lib/strategy:

if (!req._passport) {
  return this.error(new Error('passport.initialize() middleware not in use'));
}

and why req._passport is undefined?

versions

"@feathersjs/authentication": "^2.1.7",
"@feathersjs/authentication-jwt": "^2.0.0",
"@feathersjs/authentication-local": "^1.1.0",
"@feathersjs/authentication-oauth2": "^1.2.4"
"passport-wechat": "^2.0.4"

Finally I found If I comment the above line, it can still work correctly. So is that a false report error?

Any news on this issue? we have the exact same one.

同样问题

Any news on this issue? we have the exact same one.

did you resolve it?

同样问题

解决了吗

相同的问题

解决了吗

自己重写一个,他这个库,就是有这个问题,而且没人维护了

相同的问题

解决了吗

自己重写一个,他这个库,就是有这个问题,而且没人维护了

老板,可以共享一下么

相同的问题

解决了吗

自己重写一个,他这个库,就是有这个问题,而且没人维护了

老板,可以共享一下么

你参考下,我随便搞了下,后面没怎么用。https://github.com/hui9464/passport-wechatapp