Skip to content

Commit fd00272

Browse files
DerekJarvisNGPixel
andauthored
feat(auth): allow custom GitLab endpoints for self-managed instances (#6399)
* Allow custom GitLab endpoints for self-hosting --------- Co-authored-by: Nicolas Giard <github@ngpixel.com>
1 parent 5b80b5e commit fd00272

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

server/modules/authentication/gitlab/authentication.js

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ module.exports = {
1515
clientSecret: conf.clientSecret,
1616
callbackURL: conf.callbackURL,
1717
baseURL: conf.baseUrl,
18+
authorizationURL: conf.authorizationURL || (conf.baseUrl + '/oauth/authorize'),
19+
tokenURL: conf.tokenURL || (conf.baseUrl + '/oauth/token'),
1820
scope: ['read_user'],
1921
passReqToCallback: true
2022
}, async (req, accessToken, refreshToken, profile, cb) => {

server/modules/authentication/gitlab/definition.yml

+10
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,13 @@ props:
2424
hint: For self-managed GitLab instances, define the base URL (e.g. https://gitlab.example.com). Leave default for GitLab.com SaaS (https://gitlab.com).
2525
default: https://gitlab.com
2626
order: 3
27+
authorizationURL:
28+
type: String
29+
title: Authorization URL
30+
hint: For self-managed GitLab instances, define an alternate authorization URL (e.g. http://example.com/oauth/authorize). Leave empty otherwise.
31+
order: 4
32+
tokenURL:
33+
type: String
34+
title: Token URL
35+
hint: For self-managed GitLab instances, define an alternate token URL (e.g. http://example.com/oauth/token). Leave empty otherwise.
36+
order: 5

0 commit comments

Comments
 (0)