title: Email verification before registration confirmation using Meteor and React
body: <p>Just learning Meteor and Reactjs by following this <a href="https://www.youtube.com/watch?v=SHMHdIZ4l80&amp;list=PLKfAG4yMwKkSTkCFX7HXG5GAN-fvGAQqY&amp;index=7" rel="nofollow noreferrer">tutorial</a>, which is very nice to work with. This is a registration page, by default this does not verify via email before registration is done. In a real life scenario i'll like to have the users verify their emails before registration can be concluded, as a newbie I'm poised with howto, kindly help.</p>
  
  <pre><code>Signupform = React.createClass({
      mixins: [ReactMeteorData],
      getMeteorData(){
          let data = {};
          data.currentUser = Meteor.user();
          return data;
      },
      getInitialState(){
          return {
              message: '',
              messageClass: 'hidden'
          }
      },
      displayError(message){
          this.setState({message: message, messageClass: 'alert alert-danger registerError'});
      },
      handleSubmit(e){
          e.preventDefault();
          this.setState({message: '', messageClass: 'hidden'});
          var that = this;
          var first_name = ReactDOM.findDOMNode(this.refs.first_name).value.trim();
          var last_name = ReactDOM.findDOMNode(this.refs.last_name).value.trim();
          var email = ReactDOM.findDOMNode(this.refs.email).value.trim();
          var password = ReactDOM.findDOMNode(this.refs.password).value.trim();
          var user = {
              email: email,
              password: password,
              profile: {
                  fullname: (first_name + last_name).toLowerCase(),
                  firstname: first_name,
                  lastname: last_name,
                  avatar: 'http://placehold.it/150x150',
                  friends: []
              }
          };
          Accounts.createUser(user, function (e) {
  
              if (e) {
                  that.displayError(e.reason);
              } else {
                  FlowRouter.go('/dashboard');
              }
          })
  
  
      },
      render(){
          return (
              &lt;div className="row"&gt;
                  &lt;div className="signup"&gt;
                      &lt;h1&gt;Sign Up&lt;/h1&gt;
                      &lt;p className="text-muted"&gt;It's free and always will be.&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;form onSubmit={this.handleSubmit}&gt;
                      &lt;div className="col-sm-9"&gt;
                          &lt;div className="row"&gt;
                              &lt;div className="col-sm-6 form-group"&gt;
                                  &lt;input ref="first_name" type="text" placeholder="First name"
                                         className="form-control"/&gt;
                              &lt;/div&gt;
                              &lt;div className="col-sm-6 form-group"&gt;
                                  &lt;input ref="last_name" type="text" placeholder="Last name"
                                         className="form-control"/&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
  
                          &lt;div className="form-group"&gt;
                              &lt;input type="text" placeholder="Email or mobile number" ref="email"
                                     className="form-control"/&gt;
                          &lt;/div&gt;
                          &lt;div className="form-group"&gt;
                              &lt;input type="password" placeholder="New password" ref="password"
                                     className="form-control"/&gt;
                          &lt;/div&gt;
                          &lt;button type="submit" className="btn btn-md btn-success"&gt;Sign Up&lt;/button&gt;
                          &lt;span className={this.state.messageClass}&gt;{this.state.message}&lt;/span&gt;
  
                      &lt;/div&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
          )
      }
  });
  </code></pre>