Closed jbockerstette closed 7 years ago
A good place to define LDAP_DEFAULTS would be in server/main.js
:
Meteor.startup(()=>{
LDAP_DEFAULTS.url = ....
}
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.
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!
For your log-in issue, look at PR #19.
@chazsolo Have finally merged #19. If this is still relevant to you, you should be able to update to master.
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?