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 !
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.
- Remove
taiga-front
image from the current installation:
taiga-docker [stable] $ docker rmi -f taigaio/taiga-front
- Clone
taiga-front
repository in any other directory outside from taiga-docker:
git clone git@github.com:kaleidos-ventures/taiga-front.git
- Edit
taiga-front/docker/config_env_subst.sh
file to unlink the social login variables from thePUBLIC_REGISTER_ENABLED
value. Identify and change that piece of code:
- Recompile the image with this change:
taiga-front [stable] $ docker build --no-cache -f docker/Dockerfile -t taigaio/taiga-front:latest .
NOTE: Please, mind the last dot!
- Change to
taiga-docker
’s directory and edit thedocker-compose.yml
file, addding the following variables (totaiga-back
andtaiga-front
):
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"
- Then, simply start again (using the new image)
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.
We hope it serves you. Please, let us know if the solution works.
Thank you!
1 Like