Validate password using external service

Hi all,

I’m building an app where users can log in using a username and password, but cannot register.

However, I don’t want to store passwords. Instead, I’d like to send over the username and password over a secure POST request to an external server (my school’s authentication system) and receive a validation token in return. And if the external system tells me the username and password match, I’d like to allow the user to log in.

Is there precedent here? How can I use the accounts package and modify it to do this?

I would also look at the facebook/twitter authentication packages for some guidance.

Sounds like single sign on with active directory might be what you want.
I’ve never used this myself, but did a quick search and found a package:

Thanks guys!

I actually found out that the authentication system is LDAP, and I might be able to use to get it done.

Will let you know if it works.

Hi athyuttamre,

I am getting below error. when i adding this code
LDAP_DEFAULTS.searchResultsProfileMap = [
resultKey: ‘cn’,
profileProperty: ‘fullName’
resultKey: ‘sn’,
profileProperty: ‘lastName’
resultKey: ‘uid’,
profileProperty: ‘loginName’
resultKey: ‘mail’,
profileProperty: ‘email’

W20170316-12:14:23.991(-5)? (STDERR) throw er; // Unhandled ‘error’ event
W20170316-12:14:23.992(-5)? (STDERR) ^
W20170316-12:14:23.992(-5)? (STDERR) SizeLimitExceededError: Size Limit Exceeded
W20170316-12:14:23.993(-5)? (STDERR) at messageCallback (C:\Users\sravu\AppData\Local.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\ldapjs\lib\client\client.js:867:40)
W20170316-12:14:23.993(-5)? (STDERR) at Parser.onMessage (C:\Users\sravu\AppData\Local.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\ldapjs\lib\client\client.js:199:12)
W20170316-12:14:23.994(-5)? (STDERR) at emitOne (events.js:77:13)
W20170316-12:14:23.994(-5)? (STDERR) at Parser.emit (events.js:169:7)
W20170316-12:14:23.995(-5)? (STDERR) at Parser.write (C:\Users\sravu\AppData\Local.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\ldapjs\lib\messages\parser.js:105:8)
W20170316-12:14:23.995(-5)? (STDERR) at end (C:\Users\sravu\AppData\Local.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\ldapjs\lib\messages\parser.js:71:19)
W20170316-12:14:23.996(-5)? (STDERR) at Parser.write (C:\Users\sravu\AppData\Local.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\ldapjs\lib\messages\parser.js:107:10)
W20170316-12:14:23.997(-5)? (STDERR) at Socket.onData (C:\Users\sravu\AppData\Local.meteor\packages\typ_ldapjs\0.7.3\npm\node_modules\ldapjs\lib\client\client.js:155:24)
W20170316-12:14:23.997(-5)? (STDERR) at emitOne (events.js:77:13)

I actually didn’t end up using that package, sorry. So I can’t help with the error message.

Thank you. I got the solution.