覆盖Accounts.onEmailVerificationLink

时间:2015-08-07 01:12:27

标签: meteor

每当我有Accounts.onEmailVerificationLink的侧面启动功能时,我都会收到以下错误消息:

Accounts.onEmailVerificationLink was called more than once. Only one callback added will be executed.

我该怎么做才能正确覆盖这个功能?

1 个答案:

答案 0 :(得分:0)

应该在顶级代码中调用

Accounts.onEmailVerificationLink ,而不是在Meteor.startup()中调用。

你可以试试这个:

if (Meteor.isClient) {
    Accounts.onEmailVerificationLink(function(token, done) {
    ...
    });
}