shaozi / ldap-authentication

🔐🔐🔐 A simple Nodejs Async LDAP authentication library
BSD 2-Clause "Simplified" License
108 stars 28 forks source link

Search for groups is broken since ldapjs 3.0.0 #56

Closed pizzafroide closed 1 year ago

pizzafroide commented 1 year ago

Since ldapjs 3.0.0, message objects no longer have a .object accessor. It is replaced by .pojo.

Message objects no longer have a .object accessor. This has been replaced with the .pojo accessor. It didn't make any sense to have a message object with an accessor that returns an object (it's confusing). The .pojo accessor states what will be returned: a plain JavaScript object. You may find that the actual message object now has fields you can directly use. See #841.

But ldap-authentication still uses the old accessor here and the groups property in the resulting object is therefore an array of undefined...

mmende commented 1 year ago

I made a PR to fix this issue: https://github.com/shaozi/ldap-authentication/pull/57

MalfuncEddie commented 11 months ago

not sure howe this works but the latest version on npm does not contain this fix?

https://www.npmjs.com/package/ldap-authentication/v/3.0.3?activeTab=code

pizzafroide commented 11 months ago

57 is merged but the fix won't be available on npm until the next release. Dunno when it's planned though.