0

I'm having problem setting Gitlab with Auth0 authentication. I followed this tutorial https://gitlab.com/help/integration/auth0.md. When I try to sign in with Auth0, I'm redirected back to Gitlab, but there is an error message 'Signing in using your Auth0 account without a pre-existing GitLab account is not allowed.'. I followed this post https://stackoverflow.com/questions/33024270/connect-a-gitlab-account-with-saml but that didn't helped.

When I try to connect existing user with Auth0 the connection is stored, but for some reason the 'Identifier' in the account is empty. I didn't found any option how to configure identifier key or anything similar.

My config looks like this:

gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = ['oauth2_generic']
gitlab_rails['omniauth_auto_link_ldap_user'] = true
gitlab_rails['auto_link_saml_user'] = true
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['sync_profile_attributes'] = ['name', 'email', 'location']
gitlab_rails['omniauth_providers'] = [
  {
    'name' => 'auth0',
    'args' => {
      client_id: 'xxxxx',
      client_secret: 'xxxxx',
      namespace: 'xxx.eu.auth0.com'
    }
  }
]

Any idea where can be the problem? GitLab has Standard login, LDAP and now the Auth0 enabled.

There is nothing interesting in the log file.

0

You haven't set the Auth0 provider to be used.

Set gitlab_rails['omniauth_allow_single_sign_on'] = ['auth0'] and it should work.

Also, noting the recency of the post, you will also need to add scope to your config.

Example:

gitlab_rails['omniauth_providers'] = [
        { "name" => "auth0",
          "args" => { client_id: '...',
                      client_secret: '...',
                      namespace: '....auth0.com',
                      scope: 'openid profile email'
                    }
        }
] 

Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/38945

  • Yes, I found that bug two. It looks like this is the last problem with oauth. I tried to allow single sign on with value 'true', which will allow all omniauth providers. I'll wait for the bug fix and then update this thread. – martin.malek Jan 2 '18 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.