meteor - How to use Accounts.onEmailVerificationLink? -


i'm bit confused how use accounts.onemailverificationlink. docs ambiguous:

accounts.onemailverificationlink(callback)

register function call when email verification link clicked in email sent accounts.sendverificationemail. this function should called in top-level code, not inside meteor.startup().

what meant "this function", callback, or accounts.onemailverificationlink itself?

anyway, no matter put things, error message on browser console:

accounts.onemailverificationlink called more once. 1 callback added executed. 

if use collection hooks (https://atmospherejs.com/matb33/collection-hooks), can this:

meteor.users.after.update(function (userid, doc, fieldnames, modifier, options) {   if (!!modifier.$set) {     //check if email verified     if (modifier.$set['emails.$.verified'] === true) {       //do     }   } }); 

after spending time trying hook onmailverificationlink, find above less finicky.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -