const ldapOptions = {
ldapOpts: {
url: process.env.LDAP_URL,
tlsOptions: { rejectUnauthorized: false },
connectTimeout: 20000,
},
starttls: true,
userDn: `${process.env.LDAP_USERNAME_ATTRIBUTE}=${body.username},${process.env.LDAP_USER_SEARCH_BASE}`,
userPassword: body.password,
userSearchBase: process.env.LDAP_USER_SEARCH_BASE,
usernameAttribute: process.env.LDAP_USERNAME_ATTRIBUTE,
username: body.username,
groupsSearchBase:"ou=groups,dc=dev,dc=companyName,dc=com",
groupClass :"groupOfNames",
groupMemberAttribute :"member",
};
SPECS:
ldap-authentication: ^3.0.3
node: 20.5.0
CODE:
ISSUE:
I am currently updating the ldap-authentication dep from 2.3.1 to 3.0.3. When converting the dep my response from ldap is mainly the same except my groups property is an Array with undefined inside. I have tried following docs to no avail. What am I missing here?