score:3

Accounts.urls.verifyEmail function takes in a token parameter, so you can do the following:

Accounts.urls.verifyEmail = function(token) {
  return Meteor.absoluteUrl("restaurantsignin?token="+token)
}

Then the user clicks on the link in the email the token is already in the query param which you can extract with this.props.location.query.token. So in your RestaurantSignIn component's componentWillMount you can call:

Accounts.verifyEmail(this.props.location.query.token, function(error) {...})

If there are no errors you can navigate directly to an authenticated route with this.props.history.replace('/dashboard') because Accounts.verifEmail() automatically logs the user in.


Related Query

More Query from same tag