Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loginWithLdap fails with Async.runSync #57

Open
paulgration opened this issue Nov 23, 2018 · 0 comments
Open

loginWithLdap fails with Async.runSync #57

paulgration opened this issue Nov 23, 2018 · 0 comments

Comments

@paulgration
Copy link
Collaborator

The local package ppettit:accounts-ldap requires an async package to call Async.runSync, it looks as though peerlibrary:async was added specifically to the package list specifically for this local package but for some reason I'm seeing this error:

I20181123-11:18:49.586(0)? Exception while invoking method 'login' ReferenceError: Async is not defined
I20181123-11:18:49.586(0)?     at DDPCommon.MethodInvocation.<anonymous> (packages/ppettit_accounts-ldap.js:45:16)

Installing the meteorhacks:async package seemed to work (meteor add meteorhacks:async).

Also I had to change the authentication line to ad.authenticate(${loginRequest.username}@${domain}, loginRequest.ldap_password, done); where domain is specific to our institution and hard-coded in our deployment.

It'd be easy to have users enter an email address as their username (loginRequest.username) but this will be registered as their username at first login and I think the intention is that usernames and email addresses are distinct in Meteor, at least there are separate fields for them in Meteor user accounts...

I rewrote the accounts-ldap package for a different Meteor project we had a while ago, the rewrite didn't depend on external Async packages and was ES2015 - it needs some changes to make it not specific to our institution but it might be a usable as a replacement to the existing local accounts-ldap package at some stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant