From 8e8f0e3e7ced5b82b3926e3c8472a682386cd423 Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Wed, 24 Nov 2021 21:05:33 -0700 Subject: [PATCH] Change passport require --- routes/auth.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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', }),