mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -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
17
app.js
17
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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue