jaredhanson / passport-persona

Mozilla Persona authentication strategy for Passport and Node.js.
MIT License
19 stars 8 forks source link

not working with passport@0.3.0 #3

Open masakij opened 9 years ago

masakij commented 9 years ago

This issue ( https://github.com/jaredhanson/passport/issues/400 ) occured.

I got below error.

  1 App 12378 stderr: TypeError: Cannot set property 'user' of undefined
  2 App 12378 stderr:     at /path/to/my/project/node_modules/passport-persona/node_modules/passport/lib/passport/http/request.js:45:35
  3 App 12378 stderr:     at pass (/path/to/my/project/node_modules/passport/lib/authenticator.js:267:43)
  4 App 12378 stderr:     at serialized (/path/to/my/project/node_modules/passport/lib/authenticator.js:276:7)
  5 App 12378 stderr:     at /path/to/my/project/passport.js:51:9
  6 App 12378 stderr:     at pass (/path/to/my/project/node_modules/passport/lib/authenticator.js:284:9)
  7 App 12378 stderr:     at Authenticator.serializeUser (/path/to/my/project/node_modules/passport/lib/authenticator.js:289:5)
  8 App 12378 stderr:     at IncomingMessage.req.login.req.logIn (/path/to/my/project/node_modules/passport-persona/node_modules/passport/lib/passport/http/request.js:43:29)
  9 App 12378 stderr:     at Strategy.strategy.success (/path/to/my/project/node_modules/passport/lib/middleware/authenticate.js:228:13)
 10 App 12378 stderr:     at done (/path/to/my/project/node_modules/passport-persona/lib/passport-persona/strategy.js:135:12)
 11 App 12378 stderr:     at /path/to/my/project/passport.js:42:17
 12 App 12378 stderr:     at _fulfilled (/path/to/my/project/node_modules/q/q.js:834:54)
 13 App 12378 stderr:     at self.promiseDispatch.done (/path/to/my/project/node_modules/q/q.js:863:30)
 14 App 12378 stderr:     at Promise.promise.promiseDispatch (/path/to/my/project/node_modules/q/q.js:796:13)
 15 App 12378 stderr:     at /path/to/my/project/node_modules/q/q.js:556:49
 16 App 12378 stderr:     at runSingle (/path/to/my/project/node_modules/q/q.js:137:13)
 17 App 12378 stderr:     at flush (/path/to/my/project/node_modules/q/q.js:125:13)
 18 App 12378 stderr:     at process._tickCallback (node.js:355:11)

I tried replacing passport-persona's passport with new one(@0.3.0). It seems to be working ok. Could you bump dependency's passport version?

Morgul commented 8 years ago

:+1: (ran into the same issue.)

jonasfj commented 8 years ago

Guess it should depend on passport-strategy...