Skip to content

Instantly share code, notes, and snippets.

@bnoguchi
Created March 11, 2012 06:10
Show Gist options
  • Save bnoguchi/2015238 to your computer and use it in GitHub Desktop.
Save bnoguchi/2015238 to your computer and use it in GitHub Desktop.
Example everyauth ajax password response
everyauth.password
.respondToLoginSucceed( function (res, user) {
if (user) { /* Then the login was successful */
res.json({ success: true }, 200);
}
})
.respondToLoginFail( function (req, res, errors, login) {
if (!errors || !errors.length) return;
return res.json({ success: false, errors: errors });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment