paulvanbladel / aurelia-auth

:key: Authentication plugin for aurelia
200 stars 74 forks source link

Custom response message (incorrect username and/or password from server) #173

Open reft opened 7 years ago

reft commented 7 years ago

I wish to return a custom error when user tries to log in with incorrect username and/or password.

  1. How do I access my unauthorized response custom message in the login function catch error?

  2. It seems like the aurelia-auth login function must receive a httpStatusCode.Unauthorized in order for it to understand that the password/username was incorrect, but that generates a 401 (Unauthorized) console error. Can I suppress this console error or perhaps return a json result which aurelia-auth understands?

http://stackoverflow.com/questions/42532109/aurelia-auth-custom-response-message-console-error