Created
March 11, 2012 06:10
-
-
Save bnoguchi/2015238 to your computer and use it in GitHub Desktop.
Example everyauth ajax password response
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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