Closed
Description
Hi,
I'm trying to use the GitLab authentication to authenticate with our own internal gitlab. It requests the auth correctly, I authorize it on GitLab but when it returns to the callback on HackMD gives me a 500 and logs this error:
InternalOAuthError: Failed to obtain access token
at Strategy.OAuth2Strategy._createOAuthError (/hackmd/node_modules/passport-oauth2/lib/strategy.js:379:17)
at /hackmd/node_modules/passport-oauth2/lib/strategy.js:166:45
at /hackmd/node_modules/oauth/lib/oauth2.js:191:18
at ClientRequest.<anonymous> (/hackmd/node_modules/oauth/lib/oauth2.js:162:5)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1278:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
I am sending the following environment variables to HackMD:
- HMD_URL_ADDPORT=true
- HMD_DB_URL=postgres://hackmd:hackmdpass@postgres:5432/hackmd
- HMD_IMAGE_UPLOAD_TYPE=filesystem
- HMD_ALLOW_ANONYMOUS=false
- HMD_ALLOW_FREEURL=true
- HMD_EMAIL=false
- HMD_GITLAB_BASEURL=https://gitlab.internal/
- HMD_GITLAB_CLIENTID=0da7d9dc0edd9cb9f7 (altered when posting here)
- HMD_GITLAB_CLIENTSECRET=c9a4aed19d16c1b (altered when posting here)
We are running the latest master of HackMD (d6822dd) and latest Gitlab version 8.16.4.
Any ideas on what could be wrong?