title: Password Reset Auth using MERN Stack
body: <p>I'm implementing an auth token within the nodemailer email that is sent whenever a user resets their password. I've got the generated url with the appended token setup and sending properly, I just can't seem to get my routing right to handle the authentication of said token.</p>
  
  <p>My request is returning a 404 saying my GET is not found (GET <a href="http://localhost:3000/reset/XXXXXXXXXXXX" rel="nofollow noreferrer">http://localhost:3000/reset/XXXXXXXXXXXX</a> 404 (Not Found) ). Could anyone help point me in the right direction here?</p>
  
  <p><strong>Here's my api route for the server</strong> </p>
  
  <pre><code>router.get('/reset', (req, res, next) =&gt; {
     User.findOne({ resetPasswordToken: req.query.resetPasswordToken }).then(user =&gt; {
        if (user == null) {
           res.json('Password link is invalid or has expired');
        } else {
           res.status(200).send({
             username: user.email,
             message: 'Password link accepted',
           })
       }
     })
  });
  </code></pre>
  
  <p><strong>And my code to handle the request</strong></p>
  
  <pre><code>componentDidMount() {
  
    console.log(this.props.match.params.token);
  
    axios.get('/reset' + this.props.match.params.token)
      .then(response =&gt; {
        // Conditional logic here based on response returned
      })
      .catch(function (error) {
        console.log(error);
      })
  }
  </code></pre>