[Support Request]: GitLab Authentication not Working #2492

Closed
opened 2026-02-05 04:19:41 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @Ecentrix on GitHub (Nov 18, 2021).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I tried using GitLab as our Authentication Method but it seems like it doesnt work

When I try to log in with our own hosted GitLab server it gives me this error in GitLab:
image

Nothing is logged in laravel.log

GitLab v14.0.11-ee

Exact BookStack Version

v21.11

Log Content

An error has occurred
Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.

PHP Version

PHP 7.4.3

Hosting Environment

Ubuntu 20.04 LTS, installed using the Automatic Installation Script

Originally created by @Ecentrix on GitHub (Nov 18, 2021). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I tried using GitLab as our Authentication Method but it seems like it doesnt work When I try to log in with our own hosted GitLab server it gives me this error in GitLab: ![image](https://user-images.githubusercontent.com/61419778/142379766-c1604fef-b1e2-4dc9-b42e-0a8170bec388.png) Nothing is logged in laravel.log GitLab v14.0.11-ee ### Exact BookStack Version v21.11 ### Log Content An error has occurred Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method. ### PHP Version PHP 7.4.3 ### Hosting Environment Ubuntu 20.04 LTS, installed using the Automatic Installation Script
OVERLORD added the 🐕 Support label 2026-02-05 04:19:41 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 18, 2021):

Hi @Ecentrix,
Just to confirm, to set up BookStack within GitLab did you exactly follow our setup steps for GitLab authentication in your instance (https://www.bookstackapp.com/docs/admin/third-party-auth/#gitlab).

Did anything differ to the instructions during setup?

@ssddanbrown commented on GitHub (Nov 18, 2021): Hi @Ecentrix, Just to confirm, to set up BookStack within GitLab did you exactly follow our setup steps for GitLab authentication in your instance (https://www.bookstackapp.com/docs/admin/third-party-auth/#gitlab). Did anything differ to the instructions during setup?
Author
Owner

@Ecentrix commented on GitHub (Nov 18, 2021):

Hey @ssddanbrown,
Yes i followed the setup and did everything as it said.

No, i did everything as said in the setup.

i wondered if it is our gitlab but i think it isnt because we still had an older application in gitlab where you could log in thru gitlab.

@Ecentrix commented on GitHub (Nov 18, 2021): Hey @ssddanbrown, Yes i followed the setup and did everything as it said. No, i did everything as said in the setup. i wondered if it is our gitlab but i think it isnt because we still had an older application in gitlab where you could log in thru gitlab.
Author
Owner

@Ecentrix commented on GitHub (Nov 18, 2021):

The reason I tried Gitlab is because we wanted to have LDAP and normal email auth. and we configured that in our Gitlab.

And bookstack doenst support this, or am i wrong?

Another way we could make it work is if Bookstack supports 2 ldap servers, but this is also not supported or am I also wrong?

@Ecentrix commented on GitHub (Nov 18, 2021): The reason I tried Gitlab is because we wanted to have LDAP and normal email auth. and we configured that in our Gitlab. And bookstack doenst support this, or am i wrong? Another way we could make it work is if Bookstack supports 2 ldap servers, but this is also not supported or am I also wrong?
Author
Owner

@ssddanbrown commented on GitHub (Nov 18, 2021):

And bookstack doenst support this, or am i wrong?

Yeah, BookStack does not support both email and LDAP login. Nor does it support two different LDAP systems.

Just spent some time testing this on GitLab v14.0.11-ee and BookStack v21.11.
All seemed to work absolutely fine.

  • Have you definitely set set GITLAB_BASE_URI option in your .env file?
  • Upon login through the gitlab option, are you redirected to your GitLab instance or gitlab.com?
  • Does your client id or secret contain any special characters? Such as hashes or quotes?
  • Does you client id or secret exactly match that in GitLab?
  • When you view the application instance in GitLab does it have the read_user scope?
@ssddanbrown commented on GitHub (Nov 18, 2021): > And bookstack doenst support this, or am i wrong? Yeah, BookStack does not support both email and LDAP login. Nor does it support two different LDAP systems. Just spent some time testing this on GitLab v14.0.11-ee and BookStack v21.11. All seemed to work absolutely fine. - Have you definitely set set `GITLAB_BASE_URI` option in your `.env` file? - Upon login through the gitlab option, are you redirected to your GitLab instance or gitlab.com? - Does your client id or secret contain any special characters? Such as hashes or quotes? - Does you client id or secret exactly match that in GitLab? - When you view the application instance in GitLab does it have the `read_user` scope?
Author
Owner

@Ecentrix commented on GitHub (Nov 19, 2021):

I got it to work now, my problem was that I had the brackets around the IDs.

I didnt read this -> # Replace the below (including '{}' braces)

Thanks anyway

@Ecentrix commented on GitHub (Nov 19, 2021): I got it to work now, my problem was that I had the brackets around the IDs. I didnt read this -> # Replace the below (including '{}' braces) Thanks anyway
Author
Owner

@Ecentrix commented on GitHub (Nov 19, 2021):

I got this to work now

image

but when i click on Authorize i get this error in bookstack (i have debug mode on)

Unbenannt

@Ecentrix commented on GitHub (Nov 19, 2021): I got this to work now ![image](https://user-images.githubusercontent.com/61419778/142579176-5fb5c8f5-6e54-4721-8ef6-d42d33806697.png) but when i click on Authorize i get this error in bookstack (i have debug mode on) ![Unbenannt](https://user-images.githubusercontent.com/61419778/142579837-ca60899f-da8d-4170-9e1c-01a2a7b86c19.PNG)
Author
Owner

@Ecentrix commented on GitHub (Nov 19, 2021):

I Got it to work now

it was a serverside dns problem

Thanks anyway

@Ecentrix commented on GitHub (Nov 19, 2021): I Got it to work now it was a serverside dns problem Thanks anyway
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2492