oauth config: Use GITLAB_URL env variable

In order to use oauth from gitlab CE instance one has to be
able to provide the URL of the instance.

closes #209 (https://gitlab.com/commento/commento/issues/209)
This commit is contained in:
matclab
2019-07-26 12:28:19 +02:00
committed by Adhityaa Chandrasekar
parent 07cfcc9c17
commit b57b6bcc12
3 changed files with 5 additions and 1 deletions

View File

@@ -35,6 +35,8 @@ func gitlabOauthConfigure() error {
},
Endpoint: gitlab.Endpoint,
}
gitlabConfig.Endpoint.AuthURL = os.Getenv("GITLAB_URL") + "/oauth/authorize"
gitlabConfig.Endpoint.TokenURL = os.Getenv("GITLAB_URL") + "/oauth/token"
gitlabConfigured = true