# Enabling gitlab auth AND disabling public registration?

**URL:** https://community.taiga.io/t/enabling-gitlab-auth-and-disabling-public-registration/1500
**Category:** Self hosted Taiga
**Created:** [July 11, 2023, 2:06pm UTC](https://community.taiga.io/t/enabling-gitlab-auth-and-disabling-public-registration/1500 "2023-07-11T14:06:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Dirky](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/dirky/32/1269_2.png) [@Dirky](https://community.taiga.io/u/Dirky)
#### Post date: [July 11, 2023, 2:06pm UTC](https://community.taiga.io/t/enabling-gitlab-auth-and-disabling-public-registration/1500/1 "2023-07-11T14:06:41Z")

</div>

Hi,  
I saw in the official doc of Taiga that “Taiga (in its default configuration) disables both Gitlab or Github oauth buttons whenever the public registration option hasn’t been activated”. How to change the config of taiga to enable Gitlab oauth button even if the public registration hasn’t been activated ? I need for my project to enable this button but keep the public registration disabled.  
Thanks in advance for your respons !

---

<div class="post-metadata">

### Author: ![daniel.herrero](https://dub1.discourse-cdn.com/flex017/user_avatar/community.taiga.io/daniel.herrero/32/301_2.png) [@daniel.herrero](https://community.taiga.io/u/daniel.herrero)
#### Post date: [July 17, 2023, 11:12am UTC](https://community.taiga.io/t/enabling-gitlab-auth-and-disabling-public-registration/1500/2 "2023-07-17T11:12:53Z")

</div>

Hi @Dirky,

First of all, thank you for joining us, and welcome to Taiga community!

And regarding to your requirements, I’m afraid the documentation is right. You won’t be able to enable a social login without also enabling the public registration.

But… I’ve found a quick solution to it by simply recompiling the front-end image! Let’s go with the steps.

1. Remove `taiga-front` image from the current installation:

```bash
taiga-docker [stable] $ docker rmi -f taigaio/taiga-front

```

1. Clone `taiga-front` repository in any other directory outside from taiga-docker:

```bash
git clone git@github.com:kaleidos-ventures/taiga-front.git

```

1. Edit `taiga-front/docker/config_env_subst.sh` file to unlink the social login variables from the `PUBLIC_REGISTER_ENABLED` value. Identify and change that piece of code:

![image](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/5/5025580be4ad4e39cb36ad98cc8cb9cf580defc8.png)

1. Recompile the image with this change:

```bash
taiga-front [stable] $ docker build --no-cache -f docker/Dockerfile -t taigaio/taiga-front:latest .

```

> NOTE: Please, mind the last dot!

1. Change to `taiga-docker`’s directory and edit the `docker-compose.yml` file, addding the following variables (to `taiga-back` and `taiga-front`):

```auto
x-environment:
  &default-back-environment
  # These environment variables will be used by taiga-back and taiga-async.
  ...
  # ...your customizations go here
  PUBLIC_REGISTER_ENABLED: "True"
  # Github
  ENABLE_GITHUB_AUTH: "True"
  GITHUB_API_CLIENT_ID: "aexxxad3"
  GITHUB_API_CLIENT_SECRET: "6937xxxxxx3e3"
  ...

  taiga-front:
    image: taigaio/taiga-front:latest
    environment:
      ...

      # ...your customizations go here
      PUBLIC_REGISTER_ENABLED: "false"
      # Github
      ENABLE_GITHUB_AUTH: "true"
      GITHUB_CLIENT_ID: "ae2e2d43efef8568fad3"

```

1. Then, simply start again (using the new image)

```bash
taiga-docker [stable] $ docker compose up

```

If everything goes well, you should be able to log in just by Github or Gitlab (the one you have configured), without the possibility to register.

![login_github](https://europe1.discourse-cdn.com/flex017/uploads/taiga/original/2X/3/3256be6d6234ac1e7a12af2e588a88ff0ffbd5b9.gif)

We hope it serves you. Please, let us know if the solution works.

Thank you!
