JackAdams / meteor-accounts-ldap

Authentication against an LDAP server in Meteor
MIT License
21 stars 12 forks source link

Ldap errors out with "In order to perform this operation a successful bind must be completed on the connection., data 0, v2580\u0000" #29

Closed vkalav closed 3 years ago

vkalav commented 3 years ago

i have the following packages

accounts-base            
accounts-password        
babrahams:accounts-ldap  

installed and i am generating settings in server/main.js meteor.startup() like below

Meteor.startup(() => {

  LDAP.generateSettings = function (request) {
    return {
      "serverDn": "ou=Employees,ou='company Users',DC=company,DC=com",
      "serverUrl": "ldap://company.com:389",
    };
  }
});

In my jsx file i am passing params as following

let loginUserWithLDAP = (username, password, callback) => {
        var loginRequest = {
          ldap: true,
          username: username,
          pass: password,
        }
        Accounts.callLoginMethod({
          methodArguments: [loginRequest],
          userCallback: callback
        })
      }

and i am getting this error

 LDAP authentication for: test
Trying to bind test@company.com...
Callback from binding LDAP:
Search filter: (&(cn=test)(objectClass=user))
Searching ou=Employees,ou='company Users',DC=company,DC=com
"error: 000004DC: LdapErr: DSID-0C0907E9, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580\u0000"
No record was returned via LDAP

what am i missing?

vkalav commented 3 years ago

figured out the issue and closing