summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-02-16 20:08:44 -0800
committerCheng-Han, Wu2016-02-16 20:08:44 -0800
commitb2b1be3dda406312add39997ad8bd9494f20b7f8 (patch)
tree997403359ffc0f585fa52752c399ce87287222c3 /app.js
parent3f2f063e9b6c6d36169f6acefc27df87d0bd176b (diff)
Support set url path and use relative url, move raphael to bower and fixed minor issue in history
Diffstat (limited to 'app.js')
-rw-r--r--app.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/app.js b/app.js
index fbaba1f1..29162ecb 100644
--- a/app.js
+++ b/app.js
@@ -215,10 +215,10 @@ app.get('/auth/facebook',
//facebook auth callback
app.get('/auth/facebook/callback',
passport.authenticate('facebook', {
- failureRedirect: '/'
+ failureRedirect: config.getserverurl()
}),
function (req, res) {
- res.redirect('/');
+ res.redirect(config.getserverurl());
});
//twitter auth
app.get('/auth/twitter',
@@ -227,10 +227,10 @@ app.get('/auth/twitter',
//twitter auth callback
app.get('/auth/twitter/callback',
passport.authenticate('twitter', {
- failureRedirect: '/'
+ failureRedirect: config.getserverurl()
}),
function (req, res) {
- res.redirect('/');
+ res.redirect(config.getserverurl());
});
//github auth
app.get('/auth/github',
@@ -239,10 +239,10 @@ app.get('/auth/github',
//github auth callback
app.get('/auth/github/callback',
passport.authenticate('github', {
- failureRedirect: '/'
+ failureRedirect: config.getserverurl()
}),
function (req, res) {
- res.redirect('/');
+ res.redirect(config.getserverurl());
});
//github callback actions
app.get('/auth/github/callback/:noteId/:action', response.githubActions);
@@ -253,17 +253,17 @@ app.get('/auth/dropbox',
//dropbox auth callback
app.get('/auth/dropbox/callback',
passport.authenticate('dropbox-oauth2', {
- failureRedirect: '/'
+ failureRedirect: config.getserverurl()
}),
function (req, res) {
- res.redirect('/');
+ res.redirect(config.getserverurl());
});
//logout
app.get('/logout', function (req, res) {
if (config.debug && req.isAuthenticated())
logger.info('user logout: ' + req.user._id);
req.logout();
- res.redirect('/');
+ res.redirect(config.getserverurl());
});
//get history
app.get('/history', function (req, res) {