Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groups:[undefined] #62

Open
wesley3295 opened this issue Mar 26, 2024 · 1 comment
Open

groups:[undefined] #62

wesley3295 opened this issue Mar 26, 2024 · 1 comment

Comments

@wesley3295
Copy link

wesley3295 commented Mar 26, 2024

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?

@EmilienLeroy
Copy link

Hi @wesley3295

I'm encountering the same problem you are facing, and it seems that these issues have been fixed but the changes have not yet been released. You can refer to this issue #56 and this commit daf760b.

If you wish to use this updated version, you can include the following line in your package.json:

"ldap-authentication": "https://github.com/shaozi/ldap-authentication.git#daf760bbb250cec6cb84209b3d05211a882e8aa6"

This will directly download the library from GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants