Skip to content

Commit ed1d008

Browse files
authored
Merge pull request #2350 from Boeller666/omniauth_auto_provider_linking
Added support to auto-link users to Omniauth providers
2 parents f1b8c07 + bb6a889 commit ed1d008

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,7 @@ Below is the complete list of available options that can be used to customize yo
10211021
| `OAUTH_BLOCK_AUTO_CREATED_USERS` | Locks down those users until they have been cleared by the admin. Defaults to `true`. |
10221022
| `OAUTH_AUTO_LINK_LDAP_USER` | Look up new users in LDAP servers. If a match is found (same uid), automatically link the omniauth identity with the LDAP account. Defaults to `false`. |
10231023
| `OAUTH_AUTO_LINK_SAML_USER` | Allow users with existing accounts to login and auto link their account via SAML login, without having to do a manual login first and manually add SAML. Defaults to `false`. |
1024+
| `OAUTH_AUTO_LINK_USER` | Allow users with existing accounts to login and auto link their account via the defined Omniauth providers login, without having to do a manual login first and manually connect their chosen provider. Defaults to `[]`. |
10241025
| `OAUTH_EXTERNAL_PROVIDERS` | Comma separated list if oauth providers to disallow access to `internal` projects. Users creating accounts via these providers will have access internal projects. Accepted values are `cas3`, `github`, `bitbucket`, `gitlab`, `google_oauth2`, `facebook`, `twitter`, `saml`, `crowd`, `auth0` and `azure_oauth2`. No default. |
10251026
| `OAUTH_CAS3_LABEL` | The "Sign in with" button label. Defaults to "cas3". |
10261027
| `OAUTH_CAS3_SERVER` | CAS3 server URL. No defaults. |

assets/runtime/config/gitlabhq/gitlab.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,12 @@ production: &base
883883
# (default: false)
884884
auto_link_saml_user: {{OAUTH_AUTO_LINK_SAML_USER}}
885885

886+
# Allow users with existing accounts to login and auto link their account via the
887+
# defined Omniauth providers login, without having to do a manual login first and
888+
# manually connect their chosen provider.
889+
# (default: [])
890+
auto_link_user: [{{OAUTH_AUTO_LINK_USER}}]
891+
886892
# Set different Omniauth providers as external so that all users creating accounts
887893
# via these providers will not be able to have access to internal projects. You
888894
# will need to use the full name of the provider, like `google_oauth2` for Google.

assets/runtime/functions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ gitlab_configure_oauth() {
699699
OAUTH_BLOCK_AUTO_CREATED_USERS \
700700
OAUTH_AUTO_LINK_LDAP_USER \
701701
OAUTH_AUTO_LINK_SAML_USER \
702+
OAUTH_AUTO_LINK_USER \
702703
OAUTH_EXTERNAL_PROVIDERS
703704

704705
case ${OAUTH_AUTO_SIGN_IN_WITH_PROVIDER} in

0 commit comments

Comments
 (0)