Okay, banging my head against the wall on this one. I just switched from everyauth to passportjs and everything worked out great, except my implementation of Valums file uploader.
You can see the Gist of my fileuploader code at https://gist.github.com/4066155
My app.configure for express looks like this:
app.configure( function () {
app.use(express.methodOverride());
app.use(express.static(__dirname + '/public'));
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.set('view options', {
layout: false
});
app.use(passport.initialize());
app.use(passport.session());
});
Strangely enough, if I comment out app.use(passport.session()); - the file uploader seems to work fine. The passport.initialize can stay, as it is not causing any problems.
If I keep the use passport.session in my code, the upload call comes through, it actually does create a temporary file in my tmp directory, but it stays at zero bytes. The server never responds to the web client (no callback) and the file is never actually written by fs.
Even a pointer in the right direction might be very helpful. If you need more context let me know. Thanks.
Update:
If it helps, I diffed the req variable to see the difference when passport.session is not called vs when passport.session is called. The first diff is with passport.session NOT called and the second when it IS called. URL: http://diffchecker.com/Xk8g434Q - line 469 is interesting where it shows the events being bound, and then in the second block of text, events is just {} (empty).