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

Passport Local Strategy Failure Messages #18

Closed
rorymadden opened this issue Oct 2, 2012 · 2 comments
Closed

Passport Local Strategy Failure Messages #18

rorymadden opened this issue Oct 2, 2012 · 2 comments

Comments

@rorymadden
Copy link

I've been playing around with this demo and it is very good. I have an issue with trying to display the error messages from the passport local strategy e.g. Unknown user, Invalid password

In passport.js the messages are being set correctly.
In reading up about Passport the messaging seem to use the deprecated flash messaging. These are triggered by setting the failureFlash variable in the routes file.

//current format
app.post('/users/session', passport.authenticate('local', {failureRedirect: '/login'}), users.session)
//failureFlash set to true
app.post('/users/session', passport.authenticate('local', {failureRedirect: '/login', failureFlash: true}), users.session)

As Express 3.x doesn't support flash messages the connect-flash module would be required. I have been playing around with this set-up but haven't been able to get the messages to display. Have you found a way to display the message using this approach or another approach?

@madhums
Copy link
Owner

madhums commented Oct 3, 2012

Yeah this is a known issue, someone else also pointed this out... Ok I will try to get this working and let you know...

@Volox
Copy link

Volox commented Nov 27, 2012

+1

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

3 participants