You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, not an issue, but thought it would help people who want to not have a separate registration page. Makes use of "req.login", "user.authenticate" and "Account.findOne" whereas the example does not. And "req.login" is covered in passport docs, not here.
Also, for the less experienced programmer, the difference of "static" and "instance methods" might be too abstract. Luckily, I studied some Java, so recalled from there. Maybe this code snippet will help them.
And, would be nice to make "callback arguments" more prominent as its own section since my eyeballs saw it as a subsection of the resetAttempts(cb) section alone, not as a general signature for all instance methods.
Anyways, just close issue. I thought I'd put this here for others with similar needs.
Oh, BTW, first pastebin I posted did not do "authenticate" for an existing user, so that the req.user did not exist. Fixed in this pastebin.
Last, some of the error handling is just plain wrong/buggy. :)
UPDATE: if user already exists, forgot to authenticate, fixed, but didn't test, new pastebin.
Took a while for me to figure this out, might be easier way. Think it might help others.
http://pastebin.com/YD8TXJv7
Don't know how to do push requests, took a look.
The text was updated successfully, but these errors were encountered: