summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-05-15 10:58:41 +0800
committerCheng-Han, Wu2016-05-15 10:58:41 +0800
commit73835763c66a1e25ee1510a4a9d52c073115a39a (patch)
treebcbf39c232748900cbdbf0c9a4b45591657bac50 /app.js
parenta70ebf77620d6c5651e092cc4998c416161746cf (diff)
parentb96cc4eb944d88beb5472ec3cea50a0cde6f5ce8 (diff)
Merge PR #118
Diffstat (limited to '')
-rw-r--r--app.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/app.js b/app.js
index bfb9ac7d..db623a51 100644
--- a/app.js
+++ b/app.js
@@ -292,6 +292,23 @@ if (config.github) {
//github callback actions
app.get('/auth/github/callback/:noteId/:action', response.githubActions);
}
+//gitlab auth
+if (config.gitlab) {
+ app.get('/auth/gitlab',
+ passport.authenticate('gitlab'),
+ function (req, res) {});
+ //gitlab auth callback
+ app.get('/auth/gitlab/callback',
+ passport.authenticate('gitlab', {
+ failureRedirect: config.serverurl
+ }),
+ function (req, res) {
+ res.redirect(config.serverurl);
+ });
+ //gitlab callback actions
+ // TODO: Maybe in the future
+ //app.get('/auth/gitlab/callback/:noteId/:action', response.gitlabActions);
+}
//dropbox auth
if (config.dropbox) {
app.get('/auth/dropbox',