mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Start extending to support GitLab authentication.
Add necessary dependency. Add baseURL parameter for self-hosted GitLab Add necessary require. Add block for GitLab auth. Fix typo Update font-awesome dependency for GitLab icon. Use a color closer to GitLab orange. More direct TODO
This commit is contained in:
parent
8e8a5e1ecb
commit
079822dfec
8 changed files with 43 additions and 1 deletions
10
lib/auth.js
10
lib/auth.js
|
@ -4,6 +4,7 @@ var passport = require('passport');
|
|||
var FacebookStrategy = require('passport-facebook').Strategy;
|
||||
var TwitterStrategy = require('passport-twitter').Strategy;
|
||||
var GithubStrategy = require('passport-github').Strategy;
|
||||
var GitlabStrategy = require('passport-gitlab2').Strategy;
|
||||
var DropboxStrategy = require('passport-dropbox-oauth2').Strategy;
|
||||
|
||||
//core
|
||||
|
@ -56,6 +57,15 @@ if (config.github) {
|
|||
callbackURL: config.serverurl + '/auth/github/callback'
|
||||
}, callback));
|
||||
}
|
||||
//gitlab
|
||||
if (config.gitlab) {
|
||||
passport.use(new GitlabStrategy({
|
||||
baseURL: config.gitlab.baseURL,
|
||||
clientID: config.gitlab.clientID,
|
||||
clientSecret: config.gitlab.clientSecret,
|
||||
callbackURL: config.serverurl + '/auth/gitlab/callback'
|
||||
}, callback));
|
||||
}
|
||||
//dropbox
|
||||
if (config.dropbox) {
|
||||
passport.use(new DropboxStrategy({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue