aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-24 16:49:07 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-24 16:49:07 +0200
commitf3ec4f487eb96422081c60a9f00b902503bc47de (patch)
tree23cb5c26ba3aa1eda3a66ed0691adfc667d195d7
parentremoved a whole bunch of console logswq (diff)
downloadDivid-f3ec4f487eb96422081c60a9f00b902503bc47de.tar.gz
no longer redirect to /test on failurewq
-rw-r--r--config/middlewares/authorization.js2
-rw-r--r--routes.js12
2 files changed, 7 insertions, 7 deletions
diff --git a/config/middlewares/authorization.js b/config/middlewares/authorization.js
index 8d822f0..b881a3d 100644
--- a/config/middlewares/authorization.js
+++ b/config/middlewares/authorization.js
@@ -5,7 +5,7 @@
*/
exports.requiresLogin = function(req, res, next) {
- if (!req.isAuthenticated()) return res.redirect('/test');
+ if (!req.isAuthenticated()) return res.redirect('/');
next();
}
diff --git a/routes.js b/routes.js
index e535206..1062f08 100644
--- a/routes.js
+++ b/routes.js
@@ -26,7 +26,7 @@ module.exports = function(app, passport, auth) {
app.get('/login', users.login);
- app.post('/login', passport.authenticate('local', { failureRedirect: '/test' }), users.signin);
+ app.post('/login', passport.authenticate('local', { failureRedirect: '/' }), users.signin);
app.get('/signup', users.signup);
@@ -34,11 +34,11 @@ module.exports = function(app, passport, auth) {
app.post('/test', users.signin);
- app.get('/auth/facebook', passport.authenticate('facebook', { failureRedirect: '/test' }), users.signin);
- app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/test' }), users.authCallback);
+ app.get('/auth/facebook', passport.authenticate('facebook', { failureRedirect: '/' }), users.signin);
+ app.get('/auth/facebook/callback', passport.authenticate('facebook', { failureRedirect: '/' }), users.authCallback);
- app.get('/auth/twitter', passport.authenticate('twitter', { failureRedirect: '/test' }), users.signin);
- app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/test' }), users.authCallback);
+ app.get('/auth/twitter', passport.authenticate('twitter', { failureRedirect: '/' }), users.signin);
+ app.get('/auth/twitter/callback', passport.authenticate('twitter', { failureRedirect: '/' }), users.authCallback);
app.get('/invite/:randomToken', users.claimInvite);
@@ -46,7 +46,7 @@ module.exports = function(app, passport, auth) {
app.get('/logout', users.logout);
- app.get('/login/:hash', passport.authenticate('hash', { failureRedirect: '/test'}), users.randomLogin);
+ app.get('/login/:hash', passport.authenticate('hash', { failureRedirect: '/'}), users.randomLogin);
/**
* REQUIRES LOGIN