【发布时间】:2017-05-27 01:49:20
【问题描述】:
我正在使用 Angular Meteor。
我希望用户通过Accounts.sendVerificationEmail () 验证他的电子邮件
(它将带有令牌的 URL 发送给点击用户)
我已经捕获了令牌,并且可以在console.log()中看到它
我的问题是 onEmailVerificationLink 没有运行,即使我传递了 token 参数。
这可以检查,因为它没有打印到console.log()
接下来我在客户端的代码
my-app\imports\ui\components\verifyMail\verifyMail.html
.
class VerifyMail {
constructor($reactive, $scope, $stateParams) {
'ngInject';
$reactive(this).attach($scope);
this.token = $stateParams.token;
this.verifyLink();
}
verifyLink() {
this.$bindToContext(
Accounts.onEmailVerificationLink((token, done) => {
console.log('CANT PRINT THIS CONSOLE LOG');
})
);
}
}
【问题讨论】:
标签: javascript angularjs meteor angular-meteor email-verification