Fix login error message.

This commit is contained in:
theADAMJR 2023-06-04 18:34:13 +01:00
parent 19dfb63b48
commit d6bb47aa7d

View File

@ -12,7 +12,7 @@ router.post('/login', extraRateLimit(20), (req, res, next) => {
req['flash'] = (_: string, message: string) => res.status(400).json({ message });
next();
}, passport.authenticate('local', {
failWithError: true,
failWithError: false,
failureFlash: 'Invalid email or password',
}),
async (req, res) => {