If I change the verify-email so it wouldn’t have the # in it , My user is not getting verified , once they landed on the page i want them to , and keeps asking for email verification .shown in code below
this is how i change the verify email link
Template.VerifyEmail.created = function() {
if (Accounts._verifyEmailToken) {
Accounts.verifyEmail(Accounts._verifyEmailToken, function(err) {
if (err != null) {
if (err.message = 'Verify email link expired [403]') {
console.log('Sorry this verification link has expired.')
}
} else {
console.log('You account is active now !')
}
});
}
};
If I do not change the sent verify link and let the original verification token sent , once its clicked it goes to the home page of and i need to change the Template.VerifyEmail.created = function() to Template.Home.created = function() how do i fix this
thanks
It seems to work for these guys but they are using iron-router githubpage link
it s 3 in the morning here so i am going to bed , hopefully someone can have
Thanks for your reply , I actually ended up switching to iron-router and I had the same problem , so what I ended up doing is this , once the verify email link is clicked , iron router sent me back to my home page like FlowRouter
Template.Home.created = function() {
if (Accounts._verifyEmailToken) {
Accounts.verifyEmail(Accounts._verifyEmailToken, function(err) {
if (err != null) {
if (err.message = 'Verify email link expired [403]') {
console.log('Sorry this verification link has expired.')
}
} else {
Router.go('/verifyemail');
}
});
}
};