etyp / meteor-accounts-ldap

A Meteor package for logging in and creating users with LDAP credentials
MIT License
39 stars 23 forks source link

meteor add typ:accounts-ldap not working #25

Closed jbockerstette closed 7 years ago

jbockerstette commented 8 years ago

I can use the command meteor add typ:accounts-ldap and it seems to work.

However, the symbols LDAP_DEFAULTS are undefined. Or if I try to use the method Meteor.loginWithLDAP, it is also undefined.

I am using the latest meteor 1.4.1.2

How do I import?

conrad-dk commented 8 years ago

A good place to define LDAP_DEFAULTS would be in server/main.js:

Meteor.startup(()=>{
    LDAP_DEFAULTS.url = ....
}
chazsolo commented 7 years ago

I'm getting this same issue, but following Meteor's guide on application structure. I've cloned the repo to a local package and have the following:

server/main.js

import '../imports/startup/server';

imports/startup/server/index.js

// ...
import './ldap-config';
// ...

imports/startup/server/ldap-config.js

import {Meteor} from 'meteor/meteor';

Meteor.startup(function() {
    LDAP_DEFAULTS.url = 'ldap://company.domain.com';
    // ...
});

Yet, I'm still getting LDAP_DEFAULTS is not defined on that line in ldap-config.js.

chazsolo commented 7 years ago

I completely forgot - having the package locally doesn't just work, you still must meteor add typ:accounts-ldap (if you left the package name the same). After I did that, everything worked.

Still can't get a successful log-in, but that's another issue!

conrad-dk commented 7 years ago

For your log-in issue, look at PR #19.

conrad-dk commented 7 years ago

@chazsolo Have finally merged #19. If this is still relevant to you, you should be able to update to master.