Trying to sign into an instance with the GitLab.com account gives unclear error
### Summary A GitLab instance can allow authenticating with external providers, including Google, Github, or GitLab.com: https://docs.gitlab.com/ee/integration/omniauth.html When these are [disabled](https://docs.gitlab.com/ee/integration/omniauth.html#configure-common-settings), there are two UX problems: 1. You can still see the providers' buttons on the Sign in page. 1. Clicking **GitLab.com** results in an error message built from [omniauth_callbacks_controller.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/controllers/omniauth_callbacks_controller.rb#L199-205). The repetition of "GitLab" can be confusing to users ([example](https://mas.to/@Anibyl/110436468922313548)), not knowing which instance it refers to: > Signing in using your GitLab.com account without a pre-existing GitLab account is not allowed. Create a GitLab account first, and then connect it to your GitLab.com account. With other providers, it's clear: > Signing in using your Github account without a pre-existing GitLab account is not allowed. Create a GitLab account first, and then connect it to your Github account. ### Steps to reproduce 1. Go to the sign-in page of a GitLab instance with external credential providers disabled, for example https://gitlab.gnome.org/users/sign_up. 2. Select **GitLab.com** ### What is the current *bug* behavior? The repetition of "GitLab" in the error message can be confusing to users ([example](https://mas.to/@Anibyl/110436468922313548)), not knowing which instance it refers to. ### What is the expected *correct* behavior? It should be clear from the message which instances do "GitLab" and "GitLab.com" refer to. ### Relevant logs and/or screenshots Examples from the [GNOME project's GitLab](https://gitlab.gnome.org/users/sign_up): <details><summary> :eye: Click to expand</summary> | Sign up page | Error | | ------ | ------ | | ![image](/uploads/8aa15a5a5787665691fa29562bc5842c/image.png) | ![image](/uploads/c72cbb6fa57a746bfb972f29de36ee0c/image.png) | </details> ### Possible fixes **MVC 1**: Edit strings in https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/controllers/omniauth_callbacks_controller.rb#L199-205 to be clearer in case of using GitLab.com but that also work with other providers: - "Signing in using your `%{label}` account without a pre-existing GitLab account is not allowed." - "Create a GitLab account first, and then connect it to your `%{label}` account." Mentions in the following docs should also be updated to match: - https://docs.gitlab.com/ee/integration/omniauth.html#configure-common-settings - Error text in https://docs.gitlab.com/ee/integration/github.html#signing-in-using-your-github-account-without-a-pre-existing-gitlab-account-is-not-allowed - Add similar troubleshooting topic to https://docs.gitlab.com/ee/integration/gitlab.html **MVC 2**: Don't show the providers' buttons from the sign up page if account creation with these providers is disabled. | Before | After | | ------ | ------ | | ![image](/uploads/5943a7ffdc2f4bee45014a24f07bab97/image.png) | ![image](/uploads/cdf45de7869d12864bc84b2ae12aa313/image.png) | <details><summary>Skipped sections</summary> ### Output of checks <!-- If you are reporting a bug on GitLab.com, uncomment below --> <!-- This bug happens on GitLab.com --> <!-- /label ~"reproduced on GitLab.com" --> #### Results of GitLab environment info <!-- Input any relevant GitLab environment information if needed. --> <details> <summary>Expand for output related to GitLab environment info</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`) </pre> </details> #### Results of GitLab application Check <!-- Input any relevant GitLab application check information if needed. --> <details> <summary>Expand for output related to the GitLab application check</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`) (we will only investigate if the tests are passing) </pre> </details> </details>
issue