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

Active Directory #1

Open
k0dsubs opened this issue Jan 31, 2020 · 2 comments
Open

Active Directory #1

k0dsubs opened this issue Jan 31, 2020 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@k0dsubs
Copy link

k0dsubs commented Jan 31, 2020

Hi,

There seems to be an issue when authenticating against microsoft active directory, using one of the two examples (the one without mongodb), I can see that it finds the user in the active directory (by running console.log(user) ) and pulls all the information but it doesn't seem to send the "success" flag, therefore, it returns to the main page?

using the following configuration

  adminDn: 'cn=Administrator,cn=Users,dc=xxxx,dc=local',
        adminPassword: 'xxxxx',
        userPassword: req.body.password,
        userSearchBase: 'ou=IT,dc=xxxxx,dc=local',
        usernameAttribute: 'sAMAccountName',
        username: req.body.username

      }
      // ldap authenticate the user
      let user = await authenticate(options)
    console.log(user)
      
      // success
      done(null, user) <- seems to fail here
@shaozi
Copy link
Owner

shaozi commented Feb 25, 2020

Sorry just noticed this. What do you mean by not send the success flag?

@shaozi shaozi self-assigned this Feb 25, 2020
@shaozi shaozi added the good first issue Good for newcomers label Feb 25, 2020
@shaozi
Copy link
Owner

shaozi commented Feb 25, 2020

This library just get the user details from LDAP. If you are using passport, you can check this code for how to integrate the library in passport.

https://github.com/shaozi/express-passport-ldap-mongoose/blob/95db724878c62e4ce8336573649c613514ce7ecf/index.js#L87

shaozi pushed a commit that referenced this issue Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants