liangyali / passport-wechat

Passport strategy for authenticating with Wechat
158 stars 51 forks source link

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

Open flight9 opened 5 years ago

flight9 commented 5 years ago

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?

peveuve commented 5 years ago

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

hui9464 commented 3 years ago

同样问题

shadows-nhp commented 5 months ago

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

did you resolve it?

shadows-nhp commented 5 months ago

同样问题

解决了吗

hui9464 commented 5 months ago

相同的问题

解决了吗

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

shadows-nhp commented 5 months ago

相同的问题

解决了吗

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

老板,可以共享一下么

hui9464 commented 5 months ago

相同的问题

解决了吗

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

老板,可以共享一下么

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