javascript - Resent email verification link not changing verified to true -


i'm setting custom authentication system in meteor app.

when user signs up, sent email verification link. if click on this, changes verification boolean true expected.

i have button in users account setting page allows them resend verification email if needed. clicking on works ok , receive email different link.

when new link clicked, redirects home page doesn't verify email address.

my guess users account isn't aware of new token.

//server code meteor.methods({   'sendverificationemail' : function(userid, primaryemail){     var userid = meteor.user();     accounts.sendverificationemail(userid, primaryemail, function (error) {     if (! error) {       return alert('verfication email sent');     } else {       return alert(error);       };     });   } });  //client code accounts.onemailverificationlink(function (token, done) {   accounts.verifyemail(token, function (error) {     if (! error) {       console.log('account verified');       alert('account verified');     }      done();     // show if there error.   }); });  // email verification route router.route('/verify-email/:token', {   name: 'verifyemail' }); 


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -