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
image image

When allow_single_sign_on: ['saml']

Before After
image image

How to set up and validate locally

  1. On gitlab.yml, set up allow_single_sign_on to false or ['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.
  1. Go to /users/sign_up check that there are no buttons.
Edited by Eduardo Sanz García

Merge request reports

Loading