Closed MocanuMarius closed 8 years ago
Correct me if I'm mistaken, but I think you can define the status code in the response of your node application, e.g., res.status(401)
if you're using express.
@sdotson You'll need to create a custom callback/middleware for this. Check out: http://passportjs.org/docs/authenticate under custom callback
.
@MocanuMarius I think what @ebaghern provided should answer your question. Let me know if not and we can reopen this.
Hey, is there any way we can possibly customize the error response in case of an error ? Instead of "Unauthorized" , i need to use this with swagger and integrate the default swagger error code but i have no way of doing it.