Wednesday 19 September 2018

Passport failure redirect, react

Hi, I use axios to send a post request to my node js server. Then I use passport to authenticate the user. If the username and password are correct everything works fine. Unfortunately when one of them is incorrect my front end shows an error. I guess that happens because the passport.authenticate() middleware doesn't allow to access that route. I know that passport has something like a failure redirect but it doesn't work with react. Thanks for any help :)

Submitted September 19, 2018 at 02:45PM by everek123

No comments:

Post a Comment