meteor-useraccounts / core

Meteor sign up and sign in templates' core functionalities
http://useraccounts.meteor.com/
MIT License
529 stars 278 forks source link

Configure server-side hooks... on server side only? #728

Closed Salketer closed 7 years ago

Salketer commented 7 years ago

Hey guys,

I've started using this module for my useraccounts and everything is cool and nice, but I am facing a problem on configuring server-side hooks on postSignHook.

The doc says "The only other requirement is to make exactly the same calls on both the server and the client. " so that means I have to include the function of postSignHook on client side too... This wouldn't be too much problem if that didn't mean that I needed to import a very server-side proprietary library just for it...

Please, does it make a difference if I run AccountsTemplates.configure without the hook on client side? Should I use a dummy function? Or is it just not possible?

A proper way to handle the problem would be if I could do something like AccountsTemplates.postSignHook on server side...

Salketer commented 7 years ago

Looking at sources it seems that we can run AccountsTemplates.configure multiple times and every call adds to the others... So I'll just omit the hooks on my global config, and then run the hooks config server side.