logs into same account after integrating with auth0 even with different credentials

Envirnoment

I have set up a gitlab ce 10.4.3 server on ubuntu 16.04 (64-bit).

Problem

Every thing works but when logging in via auth0 the doesn't matter which user-name or account i choose it always logins the same account i.e. the first account that auth0 authenticated.

this is my omniauth configration:

gitlab_rails['omniauth_enabled'] = true gitlab_rails['omniauth_allow_single_sign_on'] = ['saml','auth0'] #gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'auth0' gitlab_rails['omniauth_block_auto_created_users'] = true

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

And theses are the application logs:

User "insert" ("insert") was created saving user insert from login with extern_uid => (OAuth) saving user "insert" from login with extern_uid => (OAuth) saving user A from login with extern_uid => (OAuth) saving user B from login with extern_uid => (OAuth) saving user C from login with extern_uid => (OAuth) saving user D from login with extern_uid => (OAuth) saving user E from login with extern_uid =>

Note:Login works fine without amniauth provider.

Production logs:

==> /var/log/gitlab/gitlab-rails/production_json.log <== {"method":"GET","path":"/users/auth/auth0/callback","format":"html","controller":"OmniauthCallbacksController","action":"auth0","status":302,"duration":359.43,"view":0.0,"db":110.93,"location":"http://IP/","time":"2018-02-07T12:32:52.690Z","params":{"code":"[FILTERED]","state":"O-agENsx64blYpGysKRHUSoSb2-CoN_V"},"remote_ip":"IP","user_id":2,"username":"insert"}

Expected

Just when i login with auth0 with every different ID a new account is created

Production log:

User "A" ("A") was created User "B" ("B") was created User "B" ("B") was created User "B" ("B") was created

Edited by shanu