Gitlab OpenLDAP Authentication

Hi

I have a OpenLDAP in my company, the setup is pretty easy all user are in ou=users,dc=ldap,dc=com
The uid is the email adress from a user, here is my LDAP Configuration:

ou=users
Distinguished Name: 
cn=USERNAME@email.com,ou=users,dc=ldap,dc=COMPANY,dc=com
cn = USERNAME@email.com
displayName = FIRSTNAME LASTNAME
givenName = FIRSTNAME
sn = LASTNAME
uid = firstname.lastname@EMAIL.com
o = FIRSTNAME.LASTNAME

Everything Upercase means placeholder for a user

Here is my gitlab.rb:

gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = {
'main' => {
  'label' => 'COMPANY LDAP',
  #'active_directory' => false,
  'host' =>  'ldap.COMPANY.com',
  'port' => 389,
  'encryption' => 'plain',
  'block_auto_created_users' => false,
  'allow_username_or_email_login' => false,
  'uid' => 'uid',
  'method' => 'plain',
  'username' => 'o',
  'email' => 'o',
  'name' => 'displayName',
  'firstname' => 'givenName',
  'lastname' => 'sn',
  #'bind_dn' => '',
  #'password' => '',
  'base' => 'ou=users,dc=ldap,dc=COMPANY,dc=com',
  'user_filter' => '(objectClass=inetorgperson)'
  }
}

Currently i dont need a bind admin for quering. If i run $ gitlab-rake gitlab:ldap:check It returns all the users without any problem. But as soon as I try to login I get a wrong credentials error. I dont see any error in my configuration and nearly the same configuration i use for other services as well.

EDIT: with the updated configuration I can now login (at ldap level) but i get the following error:

Could not authenticate you from Ldapmain because "Mail::addresslist can not parse |temp-email-for-oauth-USER@GIT-DOMAIN.com@gitlab.localhost| reason was: only able to parse up to temp-email-for-oauth-USERvDOMAIN@gitlab.localhost".

Thanks :upside_down_face: