https://github.com/LapaJr31/somerandomprojects/blob/main/server.js -- full code
https://youtu.be/1tH0meEmfqE -- recording of process
Here is a piece of code that must redirect me to the page after log in but it doesnt.
app.post('/login', checkNOTauthenticated , passport.authenticate('local', {
successRedirect: '/',
failureRedirect: '/login',
failireFlash: true
}))
There is no errors. I think it just implements failureRedirect all the time