Meteor.js and LDAP

Is there any chance that LDAP authentication will be integrated into Meteor.js in the near future?

Any tips on how to make this work today?

+7
source share
3 answers

Whenever I work with a meteorite, I suggest looking at the resources available for node.js when and if something is not in the meteorite documents, and there is no longer any relevant discussion here.

The reason this seems like a good start is because the meteorite passes inside the node.js server instance inside the fiber. At least the existing node.js modules can help you figure out where to go next.

While doing a quick google search for nodejs ldap , I found a couple of very useful resources:

http://blog.nodejs.org/2011/09/08/ldapjs-a-reprise-of-ldap/ http://ldapjs.org/

Finally, you will most likely need an answer to this question to help you: Is it possible to use the nodejs package inside the meteor application?

+5
source

By 2015, the best available package is https://atmospherejs.com/typ/accounts-ldap

 meteor add typ:accounts-ldap 

I have used this package in several projects, and in my experience it always requires dn authentication. If you want to use email instead, you will first need to find dn with a separate request (ideally, your LDAP offers you some kind of resolver / API for requesting dn by email).

On the server side, you configure the following by default (any file open on the server):

 LDAP_DEFAULTS.url = 'ldap://my-ldap-host.com' 

On the client side, you can call:

 Meteor.loginWithLDAP(login, password, { dn: 'the-resolved-dn' }, function(err) { if (err) { // login failed } else { // login successful } } 
+1
source

Your best bet right now is to look at the code https://github.com/emgee3/meteor-accounts-ldap and try to adapt it for your own purposes.

0
source

All Articles