I'm using passport.js in a node.js app to get OAuth working (awesome!), but now, I'm having problem with one thing.
I'm using backbone.js on client side, to create the views (I'm trying to create a SinglePage app...), and the only way I'm thinking about getting user id or something like that in backbone is creating first an input-hidden in jade templates and then passing it to the constructor in my backbone views.... or just assign the value to a javascript variable and passing it to the router that manages all the views, and pass it to every view that need it
I think it's not a good idea, and there might be better options!
How would you do it?
Thanks!