Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab OAuth does not work #5398

Open
sedrubal opened this issue Jan 23, 2024 · 0 comments
Open

GitLab OAuth does not work #5398

sedrubal opened this issue Jan 23, 2024 · 0 comments
Labels
type: bug Something isn't working

Comments

@sedrubal
Copy link

Description

I activated GitLab OAuth with a custom GitLab instance as described in the docs here and here. The login with all the redirects seems to work. However, at the end, I'm not authenticated and the "Sign in with GitLab" button appears again.

Steps to reproduce

  1. Create a Application in GitLab.
  2. Configure GitLab Auth Provider (see config below).
  3. Open Hedgedoc and go to Sign In > Sign in via GitLab
  4. Authenticate in GitLab and follow the redirect back to the hedgedoc app

Expected behaviour

After doing the OAuth2 dance, I should be authenticated in hedgedoc.

Logs

2024-01-23T10:40:05.784Z info:  All migrations performed successfully
2024-01-23T10:40:05.791Z info:  HTTPS Server listening at 0.0.0.0:3000
2024-01-23T10:40:12.315Z info:  $IP - - [23/Jan/2024:10:40:12 +0000] "GET / HTTP/1.0" 304 - "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

2024-01-23T10:40:12.413Z info:  $IP - - [23/Jan/2024:10:40:12 +0000] "GET /config HTTP/1.0" 304 - "https://$HOSTNAME/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

2024-01-23T10:40:12.546Z info:  $IP - - [23/Jan/2024:10:40:12 +0000] "GET /me HTTP/1.0" 200 22 "https://$HOSTNAME/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

2024-01-23T10:40:21.914Z info:  $IP - - [23/Jan/2024:10:40:21 +0000] "GET /auth/gitlab HTTP/1.0" 302 0 "https://$HOSTNAME/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

2024-01-23T10:40:22.860Z info:  serializeUser: 7b98b092-f70e-473c-a72b-1f129a5cac62
2024-01-23T10:40:22.880Z info:  $IP - - [23/Jan/2024:10:40:22 +0000] "GET /auth/gitlab/callback?code=50ec1105921163acee5258c7419e88f28410fd0f55ecf6c4b55b8922be09ac88 HTTP/1.0" 302 98 "https://$GITLAB_URL/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

2024-01-23T10:40:23.027Z info:  $IP - - [23/Jan/2024:10:40:23 +0000] "GET / HTTP/1.0" 304 - "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

2024-01-23T10:40:23.169Z info:  $IP - - [23/Jan/2024:10:40:23 +0000] "GET /config HTTP/1.0" 304 - "https://$HOSTNAME/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

2024-01-23T10:40:23.262Z info:  $IP - - [23/Jan/2024:10:40:23 +0000] "GET /me HTTP/1.0" 304 - "https://$HOSTNAME/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:YYY) Gecko/XXX Firefox/YYY"

Config

"gitlab": {
    "baseURL": "https://$GITLAB_URL/",
    "clientID": "24108d72989a3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "clientSecret": "gloas-51932xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "scope": "read_user"
}

Your Setup

  • Host OS (container host): Debian GNU/Linux 12 (bookworm)
  • Container Image: Debian GNU/Linux 11 (bullseye)
  • NodeJS version: v20.7.0
  • HedgeDoc version: 1.9.9 2023-07-30

Additional context

I'm using the official docker image with tag 1.9.9.

@sedrubal sedrubal added the type: bug Something isn't working label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant