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
Post a Comment