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

Give error on Missing Credentials instead of info #156

Open
rkt2spc opened this issue Jul 4, 2017 · 1 comment
Open

Give error on Missing Credentials instead of info #156

rkt2spc opened this issue Jul 4, 2017 · 1 comment

Comments

@rkt2spc
Copy link

rkt2spc commented Jul 4, 2017

I suggest we return error on Missing Credentials instead of return { message: 'missing credentials' } to info, it feels kinda odd

passport.authenticate('local', (err, user) => {
  if (err typeof require('passport-local/errors/MissingCredentials'))
  ...
})

Instead of

passport.authenticate('local', (err, user, info) => {
  if (!err && !user && info && info.message == 'Missing Credentials')
  ...
})
@Hum4n01d
Copy link

This is a pretty annoying error to debug, it would be helpful if an error was thrown, but at the same time, there's it isn't really an error; if somebody sends a malformed request, the problem is on their side, not the server's

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