diff --git a/routes/auth.js b/routes/auth.js index 026728c..53242d5 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -1,5 +1,6 @@ var express = require('express'); var router = express.Router(); +const passport = require('passport'); const accounts = require('./../database/accounts/accounts'); const app = require('../app'); @@ -8,7 +9,7 @@ router.get('/login', (req, res, next) => { }); router.post('/login', - accounts.passport.authenticate('local', { + passport.authenticate('local', { failureRedirect: '/fail', successRedirect: '/success', }),