Ldapjs search in production doesn't work
See original GitHub issueI’m creating a desktop app with Electron, I use ldapjs to create a connection to Actice Directory Domain Service (ADDS). When I test the app in development environment everything work, but when I create an .exe the method bind works but search always return an empty array.
Search code:
const client = ldapjs.createClient({ url: credentials.LDAP_NAME, reconnect: true });
client.bind(credentials.USER_NAME, credentials.PASSWORD, (err) => {
if (err) {
return err;
};
const results = [];
client.search(config.DN, options, [], (err, res) => {
res.on('searchEntry', (entry) => {
results.push(entry.object);
});
res.on('searchReference', (referral) => {
console.log(`referral: ${referral.uris.join()}`);
});
res.on('error', (err) => {
console.log(`error: ${err.message}`);
if (err) {
client.destroy();
resolve(results);
}
});
res.on('end', (result) => {
console.log(result.status);
client.destroy();
resolve(results);
});
});
});
When I get console logs the result is 0 and array results is []
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Ldapjs search is not working - Stack Overflow
I'm trying to search in ldapjs using method 'search', but it is not working for me. Here is response from terminal :
Read more >ldapjs-client - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >LDAP Guide - ldapjs
Most people don't know how LDAP works, other than that "it's that thing ... Really, the power of LDAP comes through the search...
Read more >Troubleshooting LDAP - GitLab Docs
On the left sidebar, select Overview > Users. Search for the user. Open the user by selecting their name. Do not select Edit....
Read more >Use LDAP and Active Directory to authenticate Node.js users
In theory, you could just open the LDAP server to the Internet—but that violates ... This code builds the filter and uses it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This repo is pretty much abandoned last I knew, you can check out ldapts for a new & typescript version. https://github.com/ldapts/ldapts#readme
Maybe that’s the reason, because today I was testing ldapts library (which supports 8.15+) and everything work fine.
What do you think? I should be use this library and try to downgrade the node version or use the other library (it’s a recent project, I’m afraid about bugs)
How did you solve it?