Well, all of those are don but the session object is still undefined after 
I login with Twitter (Twitter strategy is used). I don't see any cookie 
express the express.sid one that is set for the site. Shouldn't there be 
passport cookie too? Also, is the session object global and accessible from 
everywhere?

Thanks 

On Tuesday, May 21, 2013 10:19:29 PM UTC-7, Toddy Mladenov wrote:
>
> Just started looking as some node.js code that I inherited. It uses 
> passport and express and I get the following error when I try to load the 
> home page of the site:
>
> Tue May 21 2013 22:12:38 GMT-0700 (PDT) 1
> GET / controller: main action: index
> >>> perform protect from forgery
> <<< protect from forgery [0 ms]
> >>> perform loadUser
>
>
> /Users/toddysm/Development/Projects/iddioodev/app/controllers/application_controller.js:19
> if (session.passport.user) {
>            ^
> TypeError: Cannot read property 'passport' of undefined
>     at Object.loadUser 
> (/Users/toddysm/Development/Projects/iddioodev/app/controllers/application_controller.js:19:13)
>     at Object.<anonymous> 
> (/Users/toddysm/Development/Projects/iddioodev/node_modules/railway/lib/controller.js:377:20)
>     at 
> /Users/toddysm/Development/Projects/iddioodev/node_modules/railway/lib/controller.js:354:24
>     at process._tickCallback (node.js:415:13)
>
> It seems the session object is not created but I have no idea why. 
> Shouldn't this be created automatically when the user accesses the site?
>
> Thanks for the help!
> Toddy
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to