passport + passport-ldapauth: query a user like ldapsearch does

21 Views Asked by At

I have passport and passport-ldapauth working. I use the passport.authenticate method that needs a username and password.

How do I use the same approach to check if a users exists (using the email, for example) and have his data returned?

Basically, I would like to have the same functionality of ldapsearch that can get a user's detail from the email (or other attributes).

The use case is to query and create local users (by and administrator) and assigned them the correct permissions before the first login. When the user logs in for the first time, it is already created on the app side and has the corrects permissions.

I saw a related question using activedirectory.

0

There are 0 best solutions below