Ldap identifier field


I’ve got multiple auth providers in my application, one being with keycloak and one being with ldap. I need to save a certain mapped property from both authenticators to the users.identies.identifier column in postgres.

And this works fine with the ‘identifier_field’ option with keycloak:

'keycloak': {
   'type': 'authlib',
   'title': 'SSO',
   'mapping': {
	   'first_name': 'given_name',
	   'last_name': 'family_name',
	   'email': 'email',

I need to also specify this for the ldap authentication, but the value I want to save is not the username (uid) to login with. In essence you login with a username and their employee number given from ldap should be saved in the users.identies.identifier column instead of the username.

If I change the ‘uid’ to ‘employeeNumber’ in order to save this value in postgres, I can no longer login with the username as it expects the employeeNumber. Is there anyway around this please? E.g. a key/value pair within the ldap config to save the employeeNumber but still allow a login with the username (uid)?

Many thanks,