From 4fb5d7ac18b8121044ed1b01dc6000161985b089 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 17 Jun 2021 16:19:12 +0200 Subject: Redirect to profile page after successful login and signup. --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 016b811..792c8ec 100644 --- a/server.js +++ b/server.js @@ -286,7 +286,7 @@ app.get('/signup', function (req, res) { app.post('/login', passport.authenticate('local-login', { - successRedirect: '/', + successRedirect: '/profile', failureRedirect: '/login', failureFlash: true }) @@ -294,7 +294,7 @@ app.post('/login', app.post('/signup', passport.authenticate('local-signup', { - successRedirect: '/', + successRedirect: '/profile', failureRedirect: '/signup', failureFlash: true }) -- cgit v1.2.3