sails-auth
sails-auth copied to clipboard
local strategy, POST /auth/local return 403
Hello,
I tried sails-auth (v1.3.1), and followed the README.
I created a new user thanks to POST /user, with {"email":"[email protected]","password":"admin123"}, and then tried to login thanks to POST /auth/local with the same body, and sails-auth returns a 403 error. What am I doing wrong ?
Thanks, Sylvain
https://github.com/tjwebb/sails-auth/wiki/Logging-In
To login, you should send identity and password. I would assume that the email would be the value of the identity key.
Yes, it worked. Thanks ! And is that possible to set the identifier as another attribute, for example the username instead of the email ?
I know this is old but it's still an open discussion. Can we change that request to a 400 error instead of a 403? 403 is "you do not have permission" and 400 is "bad request" (which missing a required field is)
how to redirect to an error page if the login fails?