Add official documentation for Accounts.registerLoginHandler

Hi,

Please add some docs for Accounts.registerLoginHandler.

For 3 days I had been looking for a way to create an apollo-based account system very much like https://github.com/orionsoft/meteor-apollo-accounts but with some custom functionality. 3 days! :frowning:

(It has to be custom because our Electron and React-Native apps are going to talk to the same endpoint โ€“ so Meteor Accounts is like an accounts microservice for us).

After much google-foo I was able to cook up something. I had to dig deep into Meteor and stuff. It was a good learning experience.

Things could be much quicker if the login handler method and associated patterns, etc. could be documented somewhere officially. Perhaps you guys could make an โ€œAdvanced Docsโ€ or something with all such stuff.

Best
/P

PS: https://meteorhacks.com/extending-meteor-accounts/ was a lifesaver.

2 Likes

working link: https://web.archive.org/web/20160913210817/meteorhacks.com/extending-meteor-accounts/

that one is newer: https://janikvonrotz.ch/2017/02/08/meteor-register-ldap-login-request-handler/

but not new enough: in the registerLoginHandler, the field id of the returned object was renamed to userId.

    return {
        userId: someUser._id,
        token: stampedToken,
    };