Skip to content

groups:[undefined] #62

@wesley3295

Description

@wesley3295

SPECS:
ldap-authentication: ^3.0.3
node: 20.5.0

CODE:

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",
  };

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions