trailsjs / sails-auth

Passport-based User Authentication system for sails.js applications. Designed to work well with the sails-permissions module.
https://www.npmjs.org/package/sails-auth
MIT License
265 stars 141 forks source link

Local Login : pass SAError when user identifier does not exist #170

Open marrouchi opened 5 years ago

marrouchi commented 5 years ago

Hi,

This PR passes SAError when user identifier does not exist in the callback function. This would be very helpful especially for debuging when req.flash is not used (API app). Currently, if user identifier does not exist the the request response and the console return both "null" on login.