Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work if buffer: false is used on flatiron.plugins.http #4

Open
vanthome opened this issue Feb 19, 2013 · 3 comments
Open

Does not work if buffer: false is used on flatiron.plugins.http #4

vanthome opened this issue Feb 19, 2013 · 3 comments

Comments

@vanthome
Copy link
Contributor

Hi, a great module!
I'm currently using it and spent 2h finding out, why it would not work in my project.
Result was that if union is configured to not buffer using the option buffer: false,
then the module is not working.
Maybe this is worth mentioning it in the docs.
Greets

@thgie
Copy link

thgie commented Feb 21, 2013

Hi vanthome

I encountered the same and I guess you need to have buffer: false because of file uploads? Anyway, you can make it work by add {stream: true} to the route function. Like this:

app.router.post('/login', {stream: true},
    fipassport.authenticate('local', {
      successRedirect: '/login-success',
      failureRedirect: '/login-error'
    })
);

Yes, should probably be mentioned.

@vanthome
Copy link
Contributor Author

Hi Adrian,
unfortunately, I cannot confirm this. It only works if "buffering: true" is set on the app;
independently of the stream property you proposed.

@thgie
Copy link

thgie commented Feb 22, 2013

Hi Thomas

Please feel free to have a look at https://github.com/ichbinadrian/raum. It's far from finished, but the login process works fine on my side. Maybe you can compare the settings. Of interest might be app.js and lib/plugins/auth.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants