Hide OmniAuth buttons in signup page
What does this MR do and why?
Show specific OmniAuth buttons in signup page
If the omniauth option allow_single_sign_on is false hide the
OmniAuth buttons in signup page. That's because in this scenario an
account must be created previously.
If allow_single_sign_on is an array, show only those providers in the
signup page.
See https://docs.gitlab.com/ee/integration/omniauth.html#configure-common-settings
Relates to #415478 (closed)
Note: there is a setting that allows to signup, that's different from
allow_single_sign_on.
Changelog: changed
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
When allow_single_sign_on: false
| Before | After |
|---|---|
![]() |
![]() |
When allow_single_sign_on: ['saml']
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- On
gitlab.yml, set upallow_single_sign_ontofalseor['github']and restart the instance.
omniauth:
allow_single_sign_on: false # It means that signing in using your OmniAuth provider account is only allowed if the user has a pre-existing account in the current instance.
- Go to
/users/sign_upcheck that there are no buttons.
Edited by Eduardo Sanz García


