summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-17 16:19:12 +0200
committerTor Andersson <tor@ccxvii.net>2021-06-17 16:19:24 +0200
commit4fb5d7ac18b8121044ed1b01dc6000161985b089 (patch)
treee2762434e55d4a722d751ccaa4b0c3f1d9433263
parent60e5f108794a7e6fb85667f93829c38415a71472 (diff)
downloadserver-4fb5d7ac18b8121044ed1b01dc6000161985b089.tar.gz
Redirect to profile page after successful login and signup.
-rw-r--r--server.js4
1 files 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
})