I'm trying to implement a custom login method that uses ldap. I'm using the ldapjs node module and am able to authenticate properly against it, but I'm having troubles getting my custom login handler to work.
Right now I have the following:
1.
Accounts.registerLoginHandler("ldap", function(loginRequest) {...});
2.
Meteor.loginWithLdap = function(username, pw, callback) {
....
Accounts.callLoginMethod({
methodArguments: [loginReq],
userCallback: function (err, result) {
if (err)
console.log(err);
}
});
But when I try to call the Meteor.loginWithLdap method, I'm getting the following error (client side console):
Unrecognized options for login request [400]
Right now I just have accounts-base installed and adding users as hard coded seed data, so my users collection consists of about 10 users created like this:
Meteor.users.insert({
username: rows[i].login,
email: email
});
I've read through accounts-base and accounts-password source code with no luck, so I was wondering if maybe I'm totally missing something. Thanks!