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

Already on GitHub? Sign in to your account

Password Recipe 5: Password Hashing #310

Closed
crazycactuz opened this Issue Jul 23, 2012 · 1 comment

Comments

Projects
None yet
1 participant

It seems that the example is broken, i more or less copy pasted it but it does not work. (i might have screwed it up)

First we have this part:
"if (err) {
return promise.fail(err);
errors.push('Wrong password.');
return promise.fulfill(errors);
}"
The promise fail part seems to crash the whole thing, so i removed it and kept the following lines. (Why are there following lines after a return?)

The main problem however is that it does not seem to log me in correctly, i end up in didSucceed and later respondToLoginSucceed runs (with the correct user), but in my routes everyauth tells me im not logged in. Any ideas?

Ok i fixed the second issue, my bad.. :P
everyauth.everymodule.findUserById didnt return anything, thats why it failed to log in. I thought both it and authenticate had the same param, but in some way it extracted my id from mongoose and used that one instead of login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment